@gitmyabi/safe 1.0.65 → 1.0.66

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.
@@ -1,1761 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Safe_json = exports.Safe_jsonAbi = void 0;
4
- const viem_1 = require("viem");
5
- /**
6
- * Safe_json ABI
7
- *
8
- * This ABI is typed using viem's type system for full type safety.
9
- */
10
- exports.Safe_jsonAbi = [
11
- {
12
- "inputs": [],
13
- "stateMutability": "nonpayable",
14
- "type": "constructor"
15
- },
16
- {
17
- "anonymous": false,
18
- "inputs": [
19
- {
20
- "indexed": true,
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": true,
53
- "internalType": "address",
54
- "name": "handler",
55
- "type": "address"
56
- }
57
- ],
58
- "name": "ChangedFallbackHandler",
59
- "type": "event"
60
- },
61
- {
62
- "anonymous": false,
63
- "inputs": [
64
- {
65
- "indexed": true,
66
- "internalType": "address",
67
- "name": "guard",
68
- "type": "address"
69
- }
70
- ],
71
- "name": "ChangedGuard",
72
- "type": "event"
73
- },
74
- {
75
- "anonymous": false,
76
- "inputs": [
77
- {
78
- "indexed": false,
79
- "internalType": "uint256",
80
- "name": "threshold",
81
- "type": "uint256"
82
- }
83
- ],
84
- "name": "ChangedThreshold",
85
- "type": "event"
86
- },
87
- {
88
- "anonymous": false,
89
- "inputs": [
90
- {
91
- "indexed": true,
92
- "internalType": "address",
93
- "name": "module",
94
- "type": "address"
95
- }
96
- ],
97
- "name": "DisabledModule",
98
- "type": "event"
99
- },
100
- {
101
- "anonymous": false,
102
- "inputs": [
103
- {
104
- "indexed": true,
105
- "internalType": "address",
106
- "name": "module",
107
- "type": "address"
108
- }
109
- ],
110
- "name": "EnabledModule",
111
- "type": "event"
112
- },
113
- {
114
- "anonymous": false,
115
- "inputs": [
116
- {
117
- "indexed": true,
118
- "internalType": "bytes32",
119
- "name": "txHash",
120
- "type": "bytes32"
121
- },
122
- {
123
- "indexed": false,
124
- "internalType": "uint256",
125
- "name": "payment",
126
- "type": "uint256"
127
- }
128
- ],
129
- "name": "ExecutionFailure",
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": "ExecutionFromModuleFailure",
143
- "type": "event"
144
- },
145
- {
146
- "anonymous": false,
147
- "inputs": [
148
- {
149
- "indexed": true,
150
- "internalType": "address",
151
- "name": "module",
152
- "type": "address"
153
- }
154
- ],
155
- "name": "ExecutionFromModuleSuccess",
156
- "type": "event"
157
- },
158
- {
159
- "anonymous": false,
160
- "inputs": [
161
- {
162
- "indexed": true,
163
- "internalType": "bytes32",
164
- "name": "txHash",
165
- "type": "bytes32"
166
- },
167
- {
168
- "indexed": false,
169
- "internalType": "uint256",
170
- "name": "payment",
171
- "type": "uint256"
172
- }
173
- ],
174
- "name": "ExecutionSuccess",
175
- "type": "event"
176
- },
177
- {
178
- "anonymous": false,
179
- "inputs": [
180
- {
181
- "indexed": true,
182
- "internalType": "address",
183
- "name": "owner",
184
- "type": "address"
185
- }
186
- ],
187
- "name": "RemovedOwner",
188
- "type": "event"
189
- },
190
- {
191
- "anonymous": false,
192
- "inputs": [
193
- {
194
- "indexed": true,
195
- "internalType": "address",
196
- "name": "sender",
197
- "type": "address"
198
- },
199
- {
200
- "indexed": false,
201
- "internalType": "uint256",
202
- "name": "value",
203
- "type": "uint256"
204
- }
205
- ],
206
- "name": "SafeReceived",
207
- "type": "event"
208
- },
209
- {
210
- "anonymous": false,
211
- "inputs": [
212
- {
213
- "indexed": true,
214
- "internalType": "address",
215
- "name": "initiator",
216
- "type": "address"
217
- },
218
- {
219
- "indexed": false,
220
- "internalType": "address[]",
221
- "name": "owners",
222
- "type": "address[]"
223
- },
224
- {
225
- "indexed": false,
226
- "internalType": "uint256",
227
- "name": "threshold",
228
- "type": "uint256"
229
- },
230
- {
231
- "indexed": false,
232
- "internalType": "address",
233
- "name": "initializer",
234
- "type": "address"
235
- },
236
- {
237
- "indexed": false,
238
- "internalType": "address",
239
- "name": "fallbackHandler",
240
- "type": "address"
241
- }
242
- ],
243
- "name": "SafeSetup",
244
- "type": "event"
245
- },
246
- {
247
- "anonymous": false,
248
- "inputs": [
249
- {
250
- "indexed": true,
251
- "internalType": "bytes32",
252
- "name": "msgHash",
253
- "type": "bytes32"
254
- }
255
- ],
256
- "name": "SignMsg",
257
- "type": "event"
258
- },
259
- {
260
- "stateMutability": "nonpayable",
261
- "type": "fallback"
262
- },
263
- {
264
- "inputs": [],
265
- "name": "VERSION",
266
- "outputs": [
267
- {
268
- "internalType": "string",
269
- "name": "",
270
- "type": "string"
271
- }
272
- ],
273
- "stateMutability": "view",
274
- "type": "function"
275
- },
276
- {
277
- "inputs": [
278
- {
279
- "internalType": "address",
280
- "name": "owner",
281
- "type": "address"
282
- },
283
- {
284
- "internalType": "uint256",
285
- "name": "_threshold",
286
- "type": "uint256"
287
- }
288
- ],
289
- "name": "addOwnerWithThreshold",
290
- "outputs": [],
291
- "stateMutability": "nonpayable",
292
- "type": "function"
293
- },
294
- {
295
- "inputs": [
296
- {
297
- "internalType": "bytes32",
298
- "name": "hashToApprove",
299
- "type": "bytes32"
300
- }
301
- ],
302
- "name": "approveHash",
303
- "outputs": [],
304
- "stateMutability": "nonpayable",
305
- "type": "function"
306
- },
307
- {
308
- "inputs": [
309
- {
310
- "internalType": "address",
311
- "name": "",
312
- "type": "address"
313
- },
314
- {
315
- "internalType": "bytes32",
316
- "name": "",
317
- "type": "bytes32"
318
- }
319
- ],
320
- "name": "approvedHashes",
321
- "outputs": [
322
- {
323
- "internalType": "uint256",
324
- "name": "",
325
- "type": "uint256"
326
- }
327
- ],
328
- "stateMutability": "view",
329
- "type": "function"
330
- },
331
- {
332
- "inputs": [
333
- {
334
- "internalType": "uint256",
335
- "name": "_threshold",
336
- "type": "uint256"
337
- }
338
- ],
339
- "name": "changeThreshold",
340
- "outputs": [],
341
- "stateMutability": "nonpayable",
342
- "type": "function"
343
- },
344
- {
345
- "inputs": [
346
- {
347
- "internalType": "bytes32",
348
- "name": "dataHash",
349
- "type": "bytes32"
350
- },
351
- {
352
- "internalType": "bytes",
353
- "name": "data",
354
- "type": "bytes"
355
- },
356
- {
357
- "internalType": "bytes",
358
- "name": "signatures",
359
- "type": "bytes"
360
- },
361
- {
362
- "internalType": "uint256",
363
- "name": "requiredSignatures",
364
- "type": "uint256"
365
- }
366
- ],
367
- "name": "checkNSignatures",
368
- "outputs": [],
369
- "stateMutability": "view",
370
- "type": "function"
371
- },
372
- {
373
- "inputs": [
374
- {
375
- "internalType": "bytes32",
376
- "name": "dataHash",
377
- "type": "bytes32"
378
- },
379
- {
380
- "internalType": "bytes",
381
- "name": "data",
382
- "type": "bytes"
383
- },
384
- {
385
- "internalType": "bytes",
386
- "name": "signatures",
387
- "type": "bytes"
388
- }
389
- ],
390
- "name": "checkSignatures",
391
- "outputs": [],
392
- "stateMutability": "view",
393
- "type": "function"
394
- },
395
- {
396
- "inputs": [
397
- {
398
- "internalType": "address",
399
- "name": "prevModule",
400
- "type": "address"
401
- },
402
- {
403
- "internalType": "address",
404
- "name": "module",
405
- "type": "address"
406
- }
407
- ],
408
- "name": "disableModule",
409
- "outputs": [],
410
- "stateMutability": "nonpayable",
411
- "type": "function"
412
- },
413
- {
414
- "inputs": [],
415
- "name": "domainSeparator",
416
- "outputs": [
417
- {
418
- "internalType": "bytes32",
419
- "name": "",
420
- "type": "bytes32"
421
- }
422
- ],
423
- "stateMutability": "view",
424
- "type": "function"
425
- },
426
- {
427
- "inputs": [
428
- {
429
- "internalType": "address",
430
- "name": "module",
431
- "type": "address"
432
- }
433
- ],
434
- "name": "enableModule",
435
- "outputs": [],
436
- "stateMutability": "nonpayable",
437
- "type": "function"
438
- },
439
- {
440
- "inputs": [
441
- {
442
- "internalType": "address",
443
- "name": "to",
444
- "type": "address"
445
- },
446
- {
447
- "internalType": "uint256",
448
- "name": "value",
449
- "type": "uint256"
450
- },
451
- {
452
- "internalType": "bytes",
453
- "name": "data",
454
- "type": "bytes"
455
- },
456
- {
457
- "internalType": "enum Enum.Operation",
458
- "name": "operation",
459
- "type": "uint8"
460
- },
461
- {
462
- "internalType": "uint256",
463
- "name": "safeTxGas",
464
- "type": "uint256"
465
- },
466
- {
467
- "internalType": "uint256",
468
- "name": "baseGas",
469
- "type": "uint256"
470
- },
471
- {
472
- "internalType": "uint256",
473
- "name": "gasPrice",
474
- "type": "uint256"
475
- },
476
- {
477
- "internalType": "address",
478
- "name": "gasToken",
479
- "type": "address"
480
- },
481
- {
482
- "internalType": "address",
483
- "name": "refundReceiver",
484
- "type": "address"
485
- },
486
- {
487
- "internalType": "uint256",
488
- "name": "_nonce",
489
- "type": "uint256"
490
- }
491
- ],
492
- "name": "encodeTransactionData",
493
- "outputs": [
494
- {
495
- "internalType": "bytes",
496
- "name": "",
497
- "type": "bytes"
498
- }
499
- ],
500
- "stateMutability": "view",
501
- "type": "function"
502
- },
503
- {
504
- "inputs": [
505
- {
506
- "internalType": "address",
507
- "name": "to",
508
- "type": "address"
509
- },
510
- {
511
- "internalType": "uint256",
512
- "name": "value",
513
- "type": "uint256"
514
- },
515
- {
516
- "internalType": "bytes",
517
- "name": "data",
518
- "type": "bytes"
519
- },
520
- {
521
- "internalType": "enum Enum.Operation",
522
- "name": "operation",
523
- "type": "uint8"
524
- },
525
- {
526
- "internalType": "uint256",
527
- "name": "safeTxGas",
528
- "type": "uint256"
529
- },
530
- {
531
- "internalType": "uint256",
532
- "name": "baseGas",
533
- "type": "uint256"
534
- },
535
- {
536
- "internalType": "uint256",
537
- "name": "gasPrice",
538
- "type": "uint256"
539
- },
540
- {
541
- "internalType": "address",
542
- "name": "gasToken",
543
- "type": "address"
544
- },
545
- {
546
- "internalType": "address payable",
547
- "name": "refundReceiver",
548
- "type": "address"
549
- },
550
- {
551
- "internalType": "bytes",
552
- "name": "signatures",
553
- "type": "bytes"
554
- }
555
- ],
556
- "name": "execTransaction",
557
- "outputs": [
558
- {
559
- "internalType": "bool",
560
- "name": "success",
561
- "type": "bool"
562
- }
563
- ],
564
- "stateMutability": "payable",
565
- "type": "function"
566
- },
567
- {
568
- "inputs": [
569
- {
570
- "internalType": "address",
571
- "name": "to",
572
- "type": "address"
573
- },
574
- {
575
- "internalType": "uint256",
576
- "name": "value",
577
- "type": "uint256"
578
- },
579
- {
580
- "internalType": "bytes",
581
- "name": "data",
582
- "type": "bytes"
583
- },
584
- {
585
- "internalType": "enum Enum.Operation",
586
- "name": "operation",
587
- "type": "uint8"
588
- }
589
- ],
590
- "name": "execTransactionFromModule",
591
- "outputs": [
592
- {
593
- "internalType": "bool",
594
- "name": "success",
595
- "type": "bool"
596
- }
597
- ],
598
- "stateMutability": "nonpayable",
599
- "type": "function"
600
- },
601
- {
602
- "inputs": [
603
- {
604
- "internalType": "address",
605
- "name": "to",
606
- "type": "address"
607
- },
608
- {
609
- "internalType": "uint256",
610
- "name": "value",
611
- "type": "uint256"
612
- },
613
- {
614
- "internalType": "bytes",
615
- "name": "data",
616
- "type": "bytes"
617
- },
618
- {
619
- "internalType": "enum Enum.Operation",
620
- "name": "operation",
621
- "type": "uint8"
622
- }
623
- ],
624
- "name": "execTransactionFromModuleReturnData",
625
- "outputs": [
626
- {
627
- "internalType": "bool",
628
- "name": "success",
629
- "type": "bool"
630
- },
631
- {
632
- "internalType": "bytes",
633
- "name": "returnData",
634
- "type": "bytes"
635
- }
636
- ],
637
- "stateMutability": "nonpayable",
638
- "type": "function"
639
- },
640
- {
641
- "inputs": [],
642
- "name": "getChainId",
643
- "outputs": [
644
- {
645
- "internalType": "uint256",
646
- "name": "",
647
- "type": "uint256"
648
- }
649
- ],
650
- "stateMutability": "view",
651
- "type": "function"
652
- },
653
- {
654
- "inputs": [
655
- {
656
- "internalType": "address",
657
- "name": "start",
658
- "type": "address"
659
- },
660
- {
661
- "internalType": "uint256",
662
- "name": "pageSize",
663
- "type": "uint256"
664
- }
665
- ],
666
- "name": "getModulesPaginated",
667
- "outputs": [
668
- {
669
- "internalType": "address[]",
670
- "name": "array",
671
- "type": "address[]"
672
- },
673
- {
674
- "internalType": "address",
675
- "name": "next",
676
- "type": "address"
677
- }
678
- ],
679
- "stateMutability": "view",
680
- "type": "function"
681
- },
682
- {
683
- "inputs": [],
684
- "name": "getOwners",
685
- "outputs": [
686
- {
687
- "internalType": "address[]",
688
- "name": "",
689
- "type": "address[]"
690
- }
691
- ],
692
- "stateMutability": "view",
693
- "type": "function"
694
- },
695
- {
696
- "inputs": [
697
- {
698
- "internalType": "uint256",
699
- "name": "offset",
700
- "type": "uint256"
701
- },
702
- {
703
- "internalType": "uint256",
704
- "name": "length",
705
- "type": "uint256"
706
- }
707
- ],
708
- "name": "getStorageAt",
709
- "outputs": [
710
- {
711
- "internalType": "bytes",
712
- "name": "",
713
- "type": "bytes"
714
- }
715
- ],
716
- "stateMutability": "view",
717
- "type": "function"
718
- },
719
- {
720
- "inputs": [],
721
- "name": "getThreshold",
722
- "outputs": [
723
- {
724
- "internalType": "uint256",
725
- "name": "",
726
- "type": "uint256"
727
- }
728
- ],
729
- "stateMutability": "view",
730
- "type": "function"
731
- },
732
- {
733
- "inputs": [
734
- {
735
- "internalType": "address",
736
- "name": "to",
737
- "type": "address"
738
- },
739
- {
740
- "internalType": "uint256",
741
- "name": "value",
742
- "type": "uint256"
743
- },
744
- {
745
- "internalType": "bytes",
746
- "name": "data",
747
- "type": "bytes"
748
- },
749
- {
750
- "internalType": "enum Enum.Operation",
751
- "name": "operation",
752
- "type": "uint8"
753
- },
754
- {
755
- "internalType": "uint256",
756
- "name": "safeTxGas",
757
- "type": "uint256"
758
- },
759
- {
760
- "internalType": "uint256",
761
- "name": "baseGas",
762
- "type": "uint256"
763
- },
764
- {
765
- "internalType": "uint256",
766
- "name": "gasPrice",
767
- "type": "uint256"
768
- },
769
- {
770
- "internalType": "address",
771
- "name": "gasToken",
772
- "type": "address"
773
- },
774
- {
775
- "internalType": "address",
776
- "name": "refundReceiver",
777
- "type": "address"
778
- },
779
- {
780
- "internalType": "uint256",
781
- "name": "_nonce",
782
- "type": "uint256"
783
- }
784
- ],
785
- "name": "getTransactionHash",
786
- "outputs": [
787
- {
788
- "internalType": "bytes32",
789
- "name": "",
790
- "type": "bytes32"
791
- }
792
- ],
793
- "stateMutability": "view",
794
- "type": "function"
795
- },
796
- {
797
- "inputs": [
798
- {
799
- "internalType": "address",
800
- "name": "module",
801
- "type": "address"
802
- }
803
- ],
804
- "name": "isModuleEnabled",
805
- "outputs": [
806
- {
807
- "internalType": "bool",
808
- "name": "",
809
- "type": "bool"
810
- }
811
- ],
812
- "stateMutability": "view",
813
- "type": "function"
814
- },
815
- {
816
- "inputs": [
817
- {
818
- "internalType": "address",
819
- "name": "owner",
820
- "type": "address"
821
- }
822
- ],
823
- "name": "isOwner",
824
- "outputs": [
825
- {
826
- "internalType": "bool",
827
- "name": "",
828
- "type": "bool"
829
- }
830
- ],
831
- "stateMutability": "view",
832
- "type": "function"
833
- },
834
- {
835
- "inputs": [],
836
- "name": "nonce",
837
- "outputs": [
838
- {
839
- "internalType": "uint256",
840
- "name": "",
841
- "type": "uint256"
842
- }
843
- ],
844
- "stateMutability": "view",
845
- "type": "function"
846
- },
847
- {
848
- "inputs": [
849
- {
850
- "internalType": "address",
851
- "name": "prevOwner",
852
- "type": "address"
853
- },
854
- {
855
- "internalType": "address",
856
- "name": "owner",
857
- "type": "address"
858
- },
859
- {
860
- "internalType": "uint256",
861
- "name": "_threshold",
862
- "type": "uint256"
863
- }
864
- ],
865
- "name": "removeOwner",
866
- "outputs": [],
867
- "stateMutability": "nonpayable",
868
- "type": "function"
869
- },
870
- {
871
- "inputs": [
872
- {
873
- "internalType": "address",
874
- "name": "handler",
875
- "type": "address"
876
- }
877
- ],
878
- "name": "setFallbackHandler",
879
- "outputs": [],
880
- "stateMutability": "nonpayable",
881
- "type": "function"
882
- },
883
- {
884
- "inputs": [
885
- {
886
- "internalType": "address",
887
- "name": "guard",
888
- "type": "address"
889
- }
890
- ],
891
- "name": "setGuard",
892
- "outputs": [],
893
- "stateMutability": "nonpayable",
894
- "type": "function"
895
- },
896
- {
897
- "inputs": [
898
- {
899
- "internalType": "address[]",
900
- "name": "_owners",
901
- "type": "address[]"
902
- },
903
- {
904
- "internalType": "uint256",
905
- "name": "_threshold",
906
- "type": "uint256"
907
- },
908
- {
909
- "internalType": "address",
910
- "name": "to",
911
- "type": "address"
912
- },
913
- {
914
- "internalType": "bytes",
915
- "name": "data",
916
- "type": "bytes"
917
- },
918
- {
919
- "internalType": "address",
920
- "name": "fallbackHandler",
921
- "type": "address"
922
- },
923
- {
924
- "internalType": "address",
925
- "name": "paymentToken",
926
- "type": "address"
927
- },
928
- {
929
- "internalType": "uint256",
930
- "name": "payment",
931
- "type": "uint256"
932
- },
933
- {
934
- "internalType": "address payable",
935
- "name": "paymentReceiver",
936
- "type": "address"
937
- }
938
- ],
939
- "name": "setup",
940
- "outputs": [],
941
- "stateMutability": "nonpayable",
942
- "type": "function"
943
- },
944
- {
945
- "inputs": [
946
- {
947
- "internalType": "bytes32",
948
- "name": "",
949
- "type": "bytes32"
950
- }
951
- ],
952
- "name": "signedMessages",
953
- "outputs": [
954
- {
955
- "internalType": "uint256",
956
- "name": "",
957
- "type": "uint256"
958
- }
959
- ],
960
- "stateMutability": "view",
961
- "type": "function"
962
- },
963
- {
964
- "inputs": [
965
- {
966
- "internalType": "address",
967
- "name": "targetContract",
968
- "type": "address"
969
- },
970
- {
971
- "internalType": "bytes",
972
- "name": "calldataPayload",
973
- "type": "bytes"
974
- }
975
- ],
976
- "name": "simulateAndRevert",
977
- "outputs": [],
978
- "stateMutability": "nonpayable",
979
- "type": "function"
980
- },
981
- {
982
- "inputs": [
983
- {
984
- "internalType": "address",
985
- "name": "prevOwner",
986
- "type": "address"
987
- },
988
- {
989
- "internalType": "address",
990
- "name": "oldOwner",
991
- "type": "address"
992
- },
993
- {
994
- "internalType": "address",
995
- "name": "newOwner",
996
- "type": "address"
997
- }
998
- ],
999
- "name": "swapOwner",
1000
- "outputs": [],
1001
- "stateMutability": "nonpayable",
1002
- "type": "function"
1003
- },
1004
- {
1005
- "stateMutability": "payable",
1006
- "type": "receive"
1007
- }
1008
- ];
1009
- /**
1010
- * Safe_json Contract Class
1011
- *
1012
- * Provides a class-based API similar to TypeChain for interacting with the contract.
1013
- *
1014
- * @example
1015
- * ```typescript
1016
- * import { createPublicClient, createWalletClient, http } from 'viem';
1017
- * import { mainnet } from 'viem/chains';
1018
- * import { Safe_json } from 'Safe_json';
1019
- *
1020
- * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1021
- * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1022
- *
1023
- * const contract = new Safe_json('0x...', { publicClient, walletClient });
1024
- *
1025
- * // Read functions
1026
- * const result = await contract.balanceOf('0x...');
1027
- *
1028
- * // Write functions
1029
- * const hash = await contract.transfer('0x...', 1000n);
1030
- *
1031
- * // Simulate transactions (dry-run)
1032
- * const simulation = await contract.simulate.transfer('0x...', 1000n);
1033
- * console.log('Gas estimate:', simulation.request.gas);
1034
- *
1035
- * // Watch events
1036
- * const unwatch = contract.watch.Transfer((event) => {
1037
- * console.log('Transfer event:', event);
1038
- * });
1039
- * ```
1040
- */
1041
- class Safe_json {
1042
- constructor(address, clients) {
1043
- this.contractAddress = address;
1044
- this.publicClient = clients.publicClient;
1045
- this.contract = (0, viem_1.getContract)({
1046
- address,
1047
- abi: exports.Safe_jsonAbi,
1048
- client: {
1049
- public: clients.publicClient,
1050
- wallet: clients.walletClient,
1051
- },
1052
- });
1053
- }
1054
- /**
1055
- * Get the contract address
1056
- */
1057
- get address() {
1058
- return this.contractAddress;
1059
- }
1060
- /**
1061
- * Get the underlying viem contract instance
1062
- */
1063
- getContract() {
1064
- return this.contract;
1065
- }
1066
- /**
1067
- * VERSION
1068
- * view
1069
- */
1070
- async VERSION() {
1071
- return this.contract.read.VERSION();
1072
- }
1073
- /**
1074
- * approvedHashes
1075
- * view
1076
- */
1077
- async approvedHashes(arg0, arg1) {
1078
- return this.contract.read.approvedHashes([arg0, arg1]);
1079
- }
1080
- /**
1081
- * checkNSignatures
1082
- * view
1083
- */
1084
- async checkNSignatures(dataHash, data, signatures, requiredSignatures) {
1085
- return this.contract.read.checkNSignatures([dataHash, data, signatures, requiredSignatures]);
1086
- }
1087
- /**
1088
- * checkSignatures
1089
- * view
1090
- */
1091
- async checkSignatures(dataHash, data, signatures) {
1092
- return this.contract.read.checkSignatures([dataHash, data, signatures]);
1093
- }
1094
- /**
1095
- * domainSeparator
1096
- * view
1097
- */
1098
- async domainSeparator() {
1099
- return this.contract.read.domainSeparator();
1100
- }
1101
- /**
1102
- * encodeTransactionData
1103
- * view
1104
- */
1105
- async encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce) {
1106
- return this.contract.read.encodeTransactionData([to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce]);
1107
- }
1108
- /**
1109
- * getChainId
1110
- * view
1111
- */
1112
- async getChainId() {
1113
- return this.contract.read.getChainId();
1114
- }
1115
- /**
1116
- * getModulesPaginated
1117
- * view
1118
- */
1119
- async getModulesPaginated(start, pageSize) {
1120
- return this.contract.read.getModulesPaginated([start, pageSize]);
1121
- }
1122
- /**
1123
- * getOwners
1124
- * view
1125
- */
1126
- async getOwners() {
1127
- return this.contract.read.getOwners();
1128
- }
1129
- /**
1130
- * getStorageAt
1131
- * view
1132
- */
1133
- async getStorageAt(offset, length) {
1134
- return this.contract.read.getStorageAt([offset, length]);
1135
- }
1136
- /**
1137
- * getThreshold
1138
- * view
1139
- */
1140
- async getThreshold() {
1141
- return this.contract.read.getThreshold();
1142
- }
1143
- /**
1144
- * getTransactionHash
1145
- * view
1146
- */
1147
- async getTransactionHash(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce) {
1148
- return this.contract.read.getTransactionHash([to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce]);
1149
- }
1150
- /**
1151
- * isModuleEnabled
1152
- * view
1153
- */
1154
- async isModuleEnabled(module) {
1155
- return this.contract.read.isModuleEnabled([module]);
1156
- }
1157
- /**
1158
- * isOwner
1159
- * view
1160
- */
1161
- async isOwner(owner) {
1162
- return this.contract.read.isOwner([owner]);
1163
- }
1164
- /**
1165
- * nonce
1166
- * view
1167
- */
1168
- async nonce() {
1169
- return this.contract.read.nonce();
1170
- }
1171
- /**
1172
- * signedMessages
1173
- * view
1174
- */
1175
- async signedMessages(arg0) {
1176
- return this.contract.read.signedMessages([arg0]);
1177
- }
1178
- /**
1179
- * addOwnerWithThreshold
1180
- * nonpayable
1181
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1182
- */
1183
- async addOwnerWithThreshold(owner, _threshold, options) {
1184
- if (!this.contract.write) {
1185
- throw new Error('Wallet client is required for write operations');
1186
- }
1187
- return this.contract.write.addOwnerWithThreshold([owner, _threshold], options);
1188
- }
1189
- /**
1190
- * approveHash
1191
- * nonpayable
1192
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1193
- */
1194
- async approveHash(hashToApprove, options) {
1195
- if (!this.contract.write) {
1196
- throw new Error('Wallet client is required for write operations');
1197
- }
1198
- return this.contract.write.approveHash([hashToApprove], options);
1199
- }
1200
- /**
1201
- * changeThreshold
1202
- * nonpayable
1203
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1204
- */
1205
- async changeThreshold(_threshold, options) {
1206
- if (!this.contract.write) {
1207
- throw new Error('Wallet client is required for write operations');
1208
- }
1209
- return this.contract.write.changeThreshold([_threshold], options);
1210
- }
1211
- /**
1212
- * disableModule
1213
- * nonpayable
1214
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1215
- */
1216
- async disableModule(prevModule, module, options) {
1217
- if (!this.contract.write) {
1218
- throw new Error('Wallet client is required for write operations');
1219
- }
1220
- return this.contract.write.disableModule([prevModule, module], options);
1221
- }
1222
- /**
1223
- * enableModule
1224
- * nonpayable
1225
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1226
- */
1227
- async enableModule(module, options) {
1228
- if (!this.contract.write) {
1229
- throw new Error('Wallet client is required for write operations');
1230
- }
1231
- return this.contract.write.enableModule([module], options);
1232
- }
1233
- /**
1234
- * execTransaction
1235
- * payable
1236
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1237
- */
1238
- async execTransaction(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures, options) {
1239
- if (!this.contract.write) {
1240
- throw new Error('Wallet client is required for write operations');
1241
- }
1242
- return this.contract.write.execTransaction([to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures], options);
1243
- }
1244
- /**
1245
- * execTransactionFromModule
1246
- * nonpayable
1247
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1248
- */
1249
- async execTransactionFromModule(to, value, data, operation, options) {
1250
- if (!this.contract.write) {
1251
- throw new Error('Wallet client is required for write operations');
1252
- }
1253
- return this.contract.write.execTransactionFromModule([to, value, data, operation], options);
1254
- }
1255
- /**
1256
- * execTransactionFromModuleReturnData
1257
- * nonpayable
1258
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1259
- */
1260
- async execTransactionFromModuleReturnData(to, value, data, operation, options) {
1261
- if (!this.contract.write) {
1262
- throw new Error('Wallet client is required for write operations');
1263
- }
1264
- return this.contract.write.execTransactionFromModuleReturnData([to, value, data, operation], options);
1265
- }
1266
- /**
1267
- * removeOwner
1268
- * nonpayable
1269
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1270
- */
1271
- async removeOwner(prevOwner, owner, _threshold, options) {
1272
- if (!this.contract.write) {
1273
- throw new Error('Wallet client is required for write operations');
1274
- }
1275
- return this.contract.write.removeOwner([prevOwner, owner, _threshold], options);
1276
- }
1277
- /**
1278
- * setFallbackHandler
1279
- * nonpayable
1280
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1281
- */
1282
- async setFallbackHandler(handler, options) {
1283
- if (!this.contract.write) {
1284
- throw new Error('Wallet client is required for write operations');
1285
- }
1286
- return this.contract.write.setFallbackHandler([handler], options);
1287
- }
1288
- /**
1289
- * setGuard
1290
- * nonpayable
1291
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1292
- */
1293
- async setGuard(guard, options) {
1294
- if (!this.contract.write) {
1295
- throw new Error('Wallet client is required for write operations');
1296
- }
1297
- return this.contract.write.setGuard([guard], options);
1298
- }
1299
- /**
1300
- * setup
1301
- * nonpayable
1302
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1303
- */
1304
- async setup(_owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver, options) {
1305
- if (!this.contract.write) {
1306
- throw new Error('Wallet client is required for write operations');
1307
- }
1308
- return this.contract.write.setup([_owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver], options);
1309
- }
1310
- /**
1311
- * simulateAndRevert
1312
- * nonpayable
1313
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1314
- */
1315
- async simulateAndRevert(targetContract, calldataPayload, options) {
1316
- if (!this.contract.write) {
1317
- throw new Error('Wallet client is required for write operations');
1318
- }
1319
- return this.contract.write.simulateAndRevert([targetContract, calldataPayload], options);
1320
- }
1321
- /**
1322
- * swapOwner
1323
- * nonpayable
1324
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1325
- */
1326
- async swapOwner(prevOwner, oldOwner, newOwner, options) {
1327
- if (!this.contract.write) {
1328
- throw new Error('Wallet client is required for write operations');
1329
- }
1330
- return this.contract.write.swapOwner([prevOwner, oldOwner, newOwner], options);
1331
- }
1332
- /**
1333
- * Simulate contract write operations (dry-run without sending transaction)
1334
- *
1335
- * @example
1336
- * const result = await contract.simulate.transfer('0x...', 1000n);
1337
- * console.log('Gas estimate:', result.request.gas);
1338
- * console.log('Would succeed:', result.result);
1339
- */
1340
- get simulate() {
1341
- const contract = this.contract;
1342
- if (!contract.simulate) {
1343
- throw new Error('Public client is required for simulation');
1344
- }
1345
- return {
1346
- /**
1347
- * Simulate addOwnerWithThreshold
1348
- * Returns gas estimate and result without sending transaction
1349
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1350
- */
1351
- async addOwnerWithThreshold(owner, _threshold, options) {
1352
- return contract.simulate.addOwnerWithThreshold([owner, _threshold], options);
1353
- },
1354
- /**
1355
- * Simulate approveHash
1356
- * Returns gas estimate and result without sending transaction
1357
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1358
- */
1359
- async approveHash(hashToApprove, options) {
1360
- return contract.simulate.approveHash([hashToApprove], options);
1361
- },
1362
- /**
1363
- * Simulate changeThreshold
1364
- * Returns gas estimate and result without sending transaction
1365
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1366
- */
1367
- async changeThreshold(_threshold, options) {
1368
- return contract.simulate.changeThreshold([_threshold], options);
1369
- },
1370
- /**
1371
- * Simulate disableModule
1372
- * Returns gas estimate and result without sending transaction
1373
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1374
- */
1375
- async disableModule(prevModule, module, options) {
1376
- return contract.simulate.disableModule([prevModule, module], options);
1377
- },
1378
- /**
1379
- * Simulate enableModule
1380
- * Returns gas estimate and result without sending transaction
1381
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1382
- */
1383
- async enableModule(module, options) {
1384
- return contract.simulate.enableModule([module], options);
1385
- },
1386
- /**
1387
- * Simulate execTransaction
1388
- * Returns gas estimate and result without sending transaction
1389
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1390
- */
1391
- async execTransaction(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures, options) {
1392
- return contract.simulate.execTransaction([to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures], options);
1393
- },
1394
- /**
1395
- * Simulate execTransactionFromModule
1396
- * Returns gas estimate and result without sending transaction
1397
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1398
- */
1399
- async execTransactionFromModule(to, value, data, operation, options) {
1400
- return contract.simulate.execTransactionFromModule([to, value, data, operation], options);
1401
- },
1402
- /**
1403
- * Simulate execTransactionFromModuleReturnData
1404
- * Returns gas estimate and result without sending transaction
1405
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1406
- */
1407
- async execTransactionFromModuleReturnData(to, value, data, operation, options) {
1408
- return contract.simulate.execTransactionFromModuleReturnData([to, value, data, operation], options);
1409
- },
1410
- /**
1411
- * Simulate removeOwner
1412
- * Returns gas estimate and result without sending transaction
1413
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1414
- */
1415
- async removeOwner(prevOwner, owner, _threshold, options) {
1416
- return contract.simulate.removeOwner([prevOwner, owner, _threshold], options);
1417
- },
1418
- /**
1419
- * Simulate setFallbackHandler
1420
- * Returns gas estimate and result without sending transaction
1421
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1422
- */
1423
- async setFallbackHandler(handler, options) {
1424
- return contract.simulate.setFallbackHandler([handler], options);
1425
- },
1426
- /**
1427
- * Simulate setGuard
1428
- * Returns gas estimate and result without sending transaction
1429
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1430
- */
1431
- async setGuard(guard, options) {
1432
- return contract.simulate.setGuard([guard], options);
1433
- },
1434
- /**
1435
- * Simulate setup
1436
- * Returns gas estimate and result without sending transaction
1437
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1438
- */
1439
- async setup(_owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver, options) {
1440
- return contract.simulate.setup([_owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver], options);
1441
- },
1442
- /**
1443
- * Simulate simulateAndRevert
1444
- * Returns gas estimate and result without sending transaction
1445
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1446
- */
1447
- async simulateAndRevert(targetContract, calldataPayload, options) {
1448
- return contract.simulate.simulateAndRevert([targetContract, calldataPayload], options);
1449
- },
1450
- /**
1451
- * Simulate swapOwner
1452
- * Returns gas estimate and result without sending transaction
1453
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1454
- */
1455
- async swapOwner(prevOwner, oldOwner, newOwner, options) {
1456
- return contract.simulate.swapOwner([prevOwner, oldOwner, newOwner], options);
1457
- }
1458
- };
1459
- }
1460
- /**
1461
- * Watch contract events
1462
- *
1463
- * @example
1464
- * // Watch all Transfer events
1465
- * const unwatch = contract.watch.Transfer((event) => {
1466
- * console.log('Transfer:', event);
1467
- * });
1468
- *
1469
- * // Stop watching
1470
- * unwatch();
1471
- */
1472
- get watch() {
1473
- return {
1474
- /**
1475
- * Watch AddedOwner events
1476
- * @param callback Function to call when event is emitted
1477
- * @param filter Optional filter for indexed parameters
1478
- * @returns Unwatch function to stop listening
1479
- */
1480
- AddedOwner: (callback, filter) => {
1481
- return this.publicClient.watchContractEvent({
1482
- address: this.contractAddress,
1483
- abi: exports.Safe_jsonAbi,
1484
- eventName: 'AddedOwner',
1485
- args: filter,
1486
- onLogs: (logs) => {
1487
- logs.forEach((log) => {
1488
- callback(log.args);
1489
- });
1490
- },
1491
- });
1492
- },
1493
- /**
1494
- * Watch ApproveHash events
1495
- * @param callback Function to call when event is emitted
1496
- * @param filter Optional filter for indexed parameters
1497
- * @returns Unwatch function to stop listening
1498
- */
1499
- ApproveHash: (callback, filter) => {
1500
- return this.publicClient.watchContractEvent({
1501
- address: this.contractAddress,
1502
- abi: exports.Safe_jsonAbi,
1503
- eventName: 'ApproveHash',
1504
- args: filter,
1505
- onLogs: (logs) => {
1506
- logs.forEach((log) => {
1507
- callback(log.args);
1508
- });
1509
- },
1510
- });
1511
- },
1512
- /**
1513
- * Watch ChangedFallbackHandler events
1514
- * @param callback Function to call when event is emitted
1515
- * @param filter Optional filter for indexed parameters
1516
- * @returns Unwatch function to stop listening
1517
- */
1518
- ChangedFallbackHandler: (callback, filter) => {
1519
- return this.publicClient.watchContractEvent({
1520
- address: this.contractAddress,
1521
- abi: exports.Safe_jsonAbi,
1522
- eventName: 'ChangedFallbackHandler',
1523
- args: filter,
1524
- onLogs: (logs) => {
1525
- logs.forEach((log) => {
1526
- callback(log.args);
1527
- });
1528
- },
1529
- });
1530
- },
1531
- /**
1532
- * Watch ChangedGuard events
1533
- * @param callback Function to call when event is emitted
1534
- * @param filter Optional filter for indexed parameters
1535
- * @returns Unwatch function to stop listening
1536
- */
1537
- ChangedGuard: (callback, filter) => {
1538
- return this.publicClient.watchContractEvent({
1539
- address: this.contractAddress,
1540
- abi: exports.Safe_jsonAbi,
1541
- eventName: 'ChangedGuard',
1542
- args: filter,
1543
- onLogs: (logs) => {
1544
- logs.forEach((log) => {
1545
- callback(log.args);
1546
- });
1547
- },
1548
- });
1549
- },
1550
- /**
1551
- * Watch ChangedThreshold events
1552
- * @param callback Function to call when event is emitted
1553
- * @param filter Optional filter for indexed parameters
1554
- * @returns Unwatch function to stop listening
1555
- */
1556
- ChangedThreshold: (callback) => {
1557
- return this.publicClient.watchContractEvent({
1558
- address: this.contractAddress,
1559
- abi: exports.Safe_jsonAbi,
1560
- eventName: 'ChangedThreshold',
1561
- onLogs: (logs) => {
1562
- logs.forEach((log) => {
1563
- callback(log.args);
1564
- });
1565
- },
1566
- });
1567
- },
1568
- /**
1569
- * Watch DisabledModule events
1570
- * @param callback Function to call when event is emitted
1571
- * @param filter Optional filter for indexed parameters
1572
- * @returns Unwatch function to stop listening
1573
- */
1574
- DisabledModule: (callback, filter) => {
1575
- return this.publicClient.watchContractEvent({
1576
- address: this.contractAddress,
1577
- abi: exports.Safe_jsonAbi,
1578
- eventName: 'DisabledModule',
1579
- args: filter,
1580
- onLogs: (logs) => {
1581
- logs.forEach((log) => {
1582
- callback(log.args);
1583
- });
1584
- },
1585
- });
1586
- },
1587
- /**
1588
- * Watch EnabledModule events
1589
- * @param callback Function to call when event is emitted
1590
- * @param filter Optional filter for indexed parameters
1591
- * @returns Unwatch function to stop listening
1592
- */
1593
- EnabledModule: (callback, filter) => {
1594
- return this.publicClient.watchContractEvent({
1595
- address: this.contractAddress,
1596
- abi: exports.Safe_jsonAbi,
1597
- eventName: 'EnabledModule',
1598
- args: filter,
1599
- onLogs: (logs) => {
1600
- logs.forEach((log) => {
1601
- callback(log.args);
1602
- });
1603
- },
1604
- });
1605
- },
1606
- /**
1607
- * Watch ExecutionFailure events
1608
- * @param callback Function to call when event is emitted
1609
- * @param filter Optional filter for indexed parameters
1610
- * @returns Unwatch function to stop listening
1611
- */
1612
- ExecutionFailure: (callback, filter) => {
1613
- return this.publicClient.watchContractEvent({
1614
- address: this.contractAddress,
1615
- abi: exports.Safe_jsonAbi,
1616
- eventName: 'ExecutionFailure',
1617
- args: filter,
1618
- onLogs: (logs) => {
1619
- logs.forEach((log) => {
1620
- callback(log.args);
1621
- });
1622
- },
1623
- });
1624
- },
1625
- /**
1626
- * Watch ExecutionFromModuleFailure events
1627
- * @param callback Function to call when event is emitted
1628
- * @param filter Optional filter for indexed parameters
1629
- * @returns Unwatch function to stop listening
1630
- */
1631
- ExecutionFromModuleFailure: (callback, filter) => {
1632
- return this.publicClient.watchContractEvent({
1633
- address: this.contractAddress,
1634
- abi: exports.Safe_jsonAbi,
1635
- eventName: 'ExecutionFromModuleFailure',
1636
- args: filter,
1637
- onLogs: (logs) => {
1638
- logs.forEach((log) => {
1639
- callback(log.args);
1640
- });
1641
- },
1642
- });
1643
- },
1644
- /**
1645
- * Watch ExecutionFromModuleSuccess events
1646
- * @param callback Function to call when event is emitted
1647
- * @param filter Optional filter for indexed parameters
1648
- * @returns Unwatch function to stop listening
1649
- */
1650
- ExecutionFromModuleSuccess: (callback, filter) => {
1651
- return this.publicClient.watchContractEvent({
1652
- address: this.contractAddress,
1653
- abi: exports.Safe_jsonAbi,
1654
- eventName: 'ExecutionFromModuleSuccess',
1655
- args: filter,
1656
- onLogs: (logs) => {
1657
- logs.forEach((log) => {
1658
- callback(log.args);
1659
- });
1660
- },
1661
- });
1662
- },
1663
- /**
1664
- * Watch ExecutionSuccess events
1665
- * @param callback Function to call when event is emitted
1666
- * @param filter Optional filter for indexed parameters
1667
- * @returns Unwatch function to stop listening
1668
- */
1669
- ExecutionSuccess: (callback, filter) => {
1670
- return this.publicClient.watchContractEvent({
1671
- address: this.contractAddress,
1672
- abi: exports.Safe_jsonAbi,
1673
- eventName: 'ExecutionSuccess',
1674
- args: filter,
1675
- onLogs: (logs) => {
1676
- logs.forEach((log) => {
1677
- callback(log.args);
1678
- });
1679
- },
1680
- });
1681
- },
1682
- /**
1683
- * Watch RemovedOwner events
1684
- * @param callback Function to call when event is emitted
1685
- * @param filter Optional filter for indexed parameters
1686
- * @returns Unwatch function to stop listening
1687
- */
1688
- RemovedOwner: (callback, filter) => {
1689
- return this.publicClient.watchContractEvent({
1690
- address: this.contractAddress,
1691
- abi: exports.Safe_jsonAbi,
1692
- eventName: 'RemovedOwner',
1693
- args: filter,
1694
- onLogs: (logs) => {
1695
- logs.forEach((log) => {
1696
- callback(log.args);
1697
- });
1698
- },
1699
- });
1700
- },
1701
- /**
1702
- * Watch SafeReceived events
1703
- * @param callback Function to call when event is emitted
1704
- * @param filter Optional filter for indexed parameters
1705
- * @returns Unwatch function to stop listening
1706
- */
1707
- SafeReceived: (callback, filter) => {
1708
- return this.publicClient.watchContractEvent({
1709
- address: this.contractAddress,
1710
- abi: exports.Safe_jsonAbi,
1711
- eventName: 'SafeReceived',
1712
- args: filter,
1713
- onLogs: (logs) => {
1714
- logs.forEach((log) => {
1715
- callback(log.args);
1716
- });
1717
- },
1718
- });
1719
- },
1720
- /**
1721
- * Watch SafeSetup events
1722
- * @param callback Function to call when event is emitted
1723
- * @param filter Optional filter for indexed parameters
1724
- * @returns Unwatch function to stop listening
1725
- */
1726
- SafeSetup: (callback, filter) => {
1727
- return this.publicClient.watchContractEvent({
1728
- address: this.contractAddress,
1729
- abi: exports.Safe_jsonAbi,
1730
- eventName: 'SafeSetup',
1731
- args: filter,
1732
- onLogs: (logs) => {
1733
- logs.forEach((log) => {
1734
- callback(log.args);
1735
- });
1736
- },
1737
- });
1738
- },
1739
- /**
1740
- * Watch SignMsg events
1741
- * @param callback Function to call when event is emitted
1742
- * @param filter Optional filter for indexed parameters
1743
- * @returns Unwatch function to stop listening
1744
- */
1745
- SignMsg: (callback, filter) => {
1746
- return this.publicClient.watchContractEvent({
1747
- address: this.contractAddress,
1748
- abi: exports.Safe_jsonAbi,
1749
- eventName: 'SignMsg',
1750
- args: filter,
1751
- onLogs: (logs) => {
1752
- logs.forEach((log) => {
1753
- callback(log.args);
1754
- });
1755
- },
1756
- });
1757
- }
1758
- };
1759
- }
1760
- }
1761
- exports.Safe_json = Safe_json;