@gitmyabi/gnosissafe 1.0.13 → 1.0.15

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.
@@ -9,7 +9,6 @@ import { getContract } from 'viem';
9
9
  export const GnosisSafe_jsonAbi = [
10
10
  {
11
11
  "inputs": [],
12
- "payable": false,
13
12
  "stateMutability": "nonpayable",
14
13
  "type": "constructor"
15
14
  },
@@ -51,11 +50,24 @@ export const GnosisSafe_jsonAbi = [
51
50
  {
52
51
  "indexed": false,
53
52
  "internalType": "address",
54
- "name": "masterCopy",
53
+ "name": "handler",
54
+ "type": "address"
55
+ }
56
+ ],
57
+ "name": "ChangedFallbackHandler",
58
+ "type": "event"
59
+ },
60
+ {
61
+ "anonymous": false,
62
+ "inputs": [
63
+ {
64
+ "indexed": false,
65
+ "internalType": "address",
66
+ "name": "guard",
55
67
  "type": "address"
56
68
  }
57
69
  ],
58
- "name": "ChangedMasterCopy",
70
+ "name": "ChangedGuard",
59
71
  "type": "event"
60
72
  },
61
73
  {
@@ -76,7 +88,7 @@ export const GnosisSafe_jsonAbi = [
76
88
  "inputs": [
77
89
  {
78
90
  "indexed": false,
79
- "internalType": "contract Module",
91
+ "internalType": "address",
80
92
  "name": "module",
81
93
  "type": "address"
82
94
  }
@@ -89,7 +101,7 @@ export const GnosisSafe_jsonAbi = [
89
101
  "inputs": [
90
102
  {
91
103
  "indexed": false,
92
- "internalType": "contract Module",
104
+ "internalType": "address",
93
105
  "name": "module",
94
106
  "type": "address"
95
107
  }
@@ -179,36 +191,75 @@ export const GnosisSafe_jsonAbi = [
179
191
  "inputs": [
180
192
  {
181
193
  "indexed": true,
182
- "internalType": "bytes32",
183
- "name": "msgHash",
184
- "type": "bytes32"
194
+ "internalType": "address",
195
+ "name": "sender",
196
+ "type": "address"
197
+ },
198
+ {
199
+ "indexed": false,
200
+ "internalType": "uint256",
201
+ "name": "value",
202
+ "type": "uint256"
185
203
  }
186
204
  ],
187
- "name": "SignMsg",
205
+ "name": "SafeReceived",
188
206
  "type": "event"
189
207
  },
190
208
  {
191
- "payable": true,
192
- "stateMutability": "payable",
193
- "type": "fallback"
209
+ "anonymous": false,
210
+ "inputs": [
211
+ {
212
+ "indexed": true,
213
+ "internalType": "address",
214
+ "name": "initiator",
215
+ "type": "address"
216
+ },
217
+ {
218
+ "indexed": false,
219
+ "internalType": "address[]",
220
+ "name": "owners",
221
+ "type": "address[]"
222
+ },
223
+ {
224
+ "indexed": false,
225
+ "internalType": "uint256",
226
+ "name": "threshold",
227
+ "type": "uint256"
228
+ },
229
+ {
230
+ "indexed": false,
231
+ "internalType": "address",
232
+ "name": "initializer",
233
+ "type": "address"
234
+ },
235
+ {
236
+ "indexed": false,
237
+ "internalType": "address",
238
+ "name": "fallbackHandler",
239
+ "type": "address"
240
+ }
241
+ ],
242
+ "name": "SafeSetup",
243
+ "type": "event"
194
244
  },
195
245
  {
196
- "constant": true,
197
- "inputs": [],
198
- "name": "NAME",
199
- "outputs": [
246
+ "anonymous": false,
247
+ "inputs": [
200
248
  {
201
- "internalType": "string",
202
- "name": "",
203
- "type": "string"
249
+ "indexed": true,
250
+ "internalType": "bytes32",
251
+ "name": "msgHash",
252
+ "type": "bytes32"
204
253
  }
205
254
  ],
206
- "payable": false,
207
- "stateMutability": "view",
208
- "type": "function"
255
+ "name": "SignMsg",
256
+ "type": "event"
257
+ },
258
+ {
259
+ "stateMutability": "nonpayable",
260
+ "type": "fallback"
209
261
  },
210
262
  {
211
- "constant": true,
212
263
  "inputs": [],
213
264
  "name": "VERSION",
214
265
  "outputs": [
@@ -218,12 +269,10 @@ export const GnosisSafe_jsonAbi = [
218
269
  "type": "string"
219
270
  }
220
271
  ],
221
- "payable": false,
222
272
  "stateMutability": "view",
223
273
  "type": "function"
224
274
  },
225
275
  {
226
- "constant": false,
227
276
  "inputs": [
228
277
  {
229
278
  "internalType": "address",
@@ -238,12 +287,10 @@ export const GnosisSafe_jsonAbi = [
238
287
  ],
239
288
  "name": "addOwnerWithThreshold",
240
289
  "outputs": [],
241
- "payable": false,
242
290
  "stateMutability": "nonpayable",
243
291
  "type": "function"
244
292
  },
245
293
  {
246
- "constant": false,
247
294
  "inputs": [
248
295
  {
249
296
  "internalType": "bytes32",
@@ -253,12 +300,10 @@ export const GnosisSafe_jsonAbi = [
253
300
  ],
254
301
  "name": "approveHash",
255
302
  "outputs": [],
256
- "payable": false,
257
303
  "stateMutability": "nonpayable",
258
304
  "type": "function"
259
305
  },
260
306
  {
261
- "constant": true,
262
307
  "inputs": [
263
308
  {
264
309
  "internalType": "address",
@@ -279,62 +324,92 @@ export const GnosisSafe_jsonAbi = [
279
324
  "type": "uint256"
280
325
  }
281
326
  ],
282
- "payable": false,
283
327
  "stateMutability": "view",
284
328
  "type": "function"
285
329
  },
286
330
  {
287
- "constant": false,
288
331
  "inputs": [
289
332
  {
290
- "internalType": "address",
291
- "name": "_masterCopy",
292
- "type": "address"
333
+ "internalType": "uint256",
334
+ "name": "_threshold",
335
+ "type": "uint256"
293
336
  }
294
337
  ],
295
- "name": "changeMasterCopy",
338
+ "name": "changeThreshold",
296
339
  "outputs": [],
297
- "payable": false,
298
340
  "stateMutability": "nonpayable",
299
341
  "type": "function"
300
342
  },
301
343
  {
302
- "constant": false,
303
344
  "inputs": [
345
+ {
346
+ "internalType": "bytes32",
347
+ "name": "dataHash",
348
+ "type": "bytes32"
349
+ },
350
+ {
351
+ "internalType": "bytes",
352
+ "name": "data",
353
+ "type": "bytes"
354
+ },
355
+ {
356
+ "internalType": "bytes",
357
+ "name": "signatures",
358
+ "type": "bytes"
359
+ },
304
360
  {
305
361
  "internalType": "uint256",
306
- "name": "_threshold",
362
+ "name": "requiredSignatures",
307
363
  "type": "uint256"
308
364
  }
309
365
  ],
310
- "name": "changeThreshold",
366
+ "name": "checkNSignatures",
311
367
  "outputs": [],
312
- "payable": false,
313
- "stateMutability": "nonpayable",
368
+ "stateMutability": "view",
369
+ "type": "function"
370
+ },
371
+ {
372
+ "inputs": [
373
+ {
374
+ "internalType": "bytes32",
375
+ "name": "dataHash",
376
+ "type": "bytes32"
377
+ },
378
+ {
379
+ "internalType": "bytes",
380
+ "name": "data",
381
+ "type": "bytes"
382
+ },
383
+ {
384
+ "internalType": "bytes",
385
+ "name": "signatures",
386
+ "type": "bytes"
387
+ }
388
+ ],
389
+ "name": "checkSignatures",
390
+ "outputs": [],
391
+ "stateMutability": "view",
314
392
  "type": "function"
315
393
  },
316
394
  {
317
- "constant": false,
318
395
  "inputs": [
319
396
  {
320
- "internalType": "contract Module",
397
+ "internalType": "address",
321
398
  "name": "prevModule",
322
399
  "type": "address"
323
400
  },
324
401
  {
325
- "internalType": "contract Module",
402
+ "internalType": "address",
326
403
  "name": "module",
327
404
  "type": "address"
328
405
  }
329
406
  ],
330
407
  "name": "disableModule",
331
408
  "outputs": [],
332
- "payable": false,
333
409
  "stateMutability": "nonpayable",
334
410
  "type": "function"
335
411
  },
336
412
  {
337
- "constant": true,
338
413
  "inputs": [],
339
414
  "name": "domainSeparator",
340
415
  "outputs": [
@@ -344,27 +419,23 @@ export const GnosisSafe_jsonAbi = [
344
419
  "type": "bytes32"
345
420
  }
346
421
  ],
347
- "payable": false,
348
422
  "stateMutability": "view",
349
423
  "type": "function"
350
424
  },
351
425
  {
352
- "constant": false,
353
426
  "inputs": [
354
427
  {
355
- "internalType": "contract Module",
428
+ "internalType": "address",
356
429
  "name": "module",
357
430
  "type": "address"
358
431
  }
359
432
  ],
360
433
  "name": "enableModule",
361
434
  "outputs": [],
362
- "payable": false,
363
435
  "stateMutability": "nonpayable",
364
436
  "type": "function"
365
437
  },
366
438
  {
367
- "constant": true,
368
439
  "inputs": [
369
440
  {
370
441
  "internalType": "address",
@@ -425,12 +496,10 @@ export const GnosisSafe_jsonAbi = [
425
496
  "type": "bytes"
426
497
  }
427
498
  ],
428
- "payable": false,
429
499
  "stateMutability": "view",
430
500
  "type": "function"
431
501
  },
432
502
  {
433
- "constant": false,
434
503
  "inputs": [
435
504
  {
436
505
  "internalType": "address",
@@ -491,12 +560,10 @@ export const GnosisSafe_jsonAbi = [
491
560
  "type": "bool"
492
561
  }
493
562
  ],
494
- "payable": false,
495
- "stateMutability": "nonpayable",
563
+ "stateMutability": "payable",
496
564
  "type": "function"
497
565
  },
498
566
  {
499
- "constant": false,
500
567
  "inputs": [
501
568
  {
502
569
  "internalType": "address",
@@ -527,12 +594,10 @@ export const GnosisSafe_jsonAbi = [
527
594
  "type": "bool"
528
595
  }
529
596
  ],
530
- "payable": false,
531
597
  "stateMutability": "nonpayable",
532
598
  "type": "function"
533
599
  },
534
600
  {
535
- "constant": false,
536
601
  "inputs": [
537
602
  {
538
603
  "internalType": "address",
@@ -568,48 +633,23 @@ export const GnosisSafe_jsonAbi = [
568
633
  "type": "bytes"
569
634
  }
570
635
  ],
571
- "payable": false,
572
636
  "stateMutability": "nonpayable",
573
637
  "type": "function"
574
638
  },
575
639
  {
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
640
  "inputs": [],
599
- "name": "getModules",
641
+ "name": "getChainId",
600
642
  "outputs": [
601
643
  {
602
- "internalType": "address[]",
644
+ "internalType": "uint256",
603
645
  "name": "",
604
- "type": "address[]"
646
+ "type": "uint256"
605
647
  }
606
648
  ],
607
- "payable": false,
608
649
  "stateMutability": "view",
609
650
  "type": "function"
610
651
  },
611
652
  {
612
- "constant": true,
613
653
  "inputs": [
614
654
  {
615
655
  "internalType": "address",
@@ -635,12 +675,10 @@ export const GnosisSafe_jsonAbi = [
635
675
  "type": "address"
636
676
  }
637
677
  ],
638
- "payable": false,
639
678
  "stateMutability": "view",
640
679
  "type": "function"
641
680
  },
642
681
  {
643
- "constant": true,
644
682
  "inputs": [],
645
683
  "name": "getOwners",
646
684
  "outputs": [
@@ -650,12 +688,34 @@ export const GnosisSafe_jsonAbi = [
650
688
  "type": "address[]"
651
689
  }
652
690
  ],
653
- "payable": false,
654
691
  "stateMutability": "view",
655
692
  "type": "function"
656
693
  },
657
694
  {
658
- "constant": true,
695
+ "inputs": [
696
+ {
697
+ "internalType": "uint256",
698
+ "name": "offset",
699
+ "type": "uint256"
700
+ },
701
+ {
702
+ "internalType": "uint256",
703
+ "name": "length",
704
+ "type": "uint256"
705
+ }
706
+ ],
707
+ "name": "getStorageAt",
708
+ "outputs": [
709
+ {
710
+ "internalType": "bytes",
711
+ "name": "",
712
+ "type": "bytes"
713
+ }
714
+ ],
715
+ "stateMutability": "view",
716
+ "type": "function"
717
+ },
718
+ {
659
719
  "inputs": [],
660
720
  "name": "getThreshold",
661
721
  "outputs": [
@@ -665,12 +725,10 @@ export const GnosisSafe_jsonAbi = [
665
725
  "type": "uint256"
666
726
  }
667
727
  ],
668
- "payable": false,
669
728
  "stateMutability": "view",
670
729
  "type": "function"
671
730
  },
672
731
  {
673
- "constant": true,
674
732
  "inputs": [
675
733
  {
676
734
  "internalType": "address",
@@ -731,20 +789,18 @@ export const GnosisSafe_jsonAbi = [
731
789
  "type": "bytes32"
732
790
  }
733
791
  ],
734
- "payable": false,
735
792
  "stateMutability": "view",
736
793
  "type": "function"
737
794
  },
738
795
  {
739
- "constant": true,
740
796
  "inputs": [
741
797
  {
742
798
  "internalType": "address",
743
- "name": "owner",
799
+ "name": "module",
744
800
  "type": "address"
745
801
  }
746
802
  ],
747
- "name": "isOwner",
803
+ "name": "isModuleEnabled",
748
804
  "outputs": [
749
805
  {
750
806
  "internalType": "bool",
@@ -752,38 +808,29 @@ export const GnosisSafe_jsonAbi = [
752
808
  "type": "bool"
753
809
  }
754
810
  ],
755
- "payable": false,
756
811
  "stateMutability": "view",
757
812
  "type": "function"
758
813
  },
759
814
  {
760
- "constant": false,
761
815
  "inputs": [
762
816
  {
763
- "internalType": "bytes",
764
- "name": "_data",
765
- "type": "bytes"
766
- },
767
- {
768
- "internalType": "bytes",
769
- "name": "_signature",
770
- "type": "bytes"
817
+ "internalType": "address",
818
+ "name": "owner",
819
+ "type": "address"
771
820
  }
772
821
  ],
773
- "name": "isValidSignature",
822
+ "name": "isOwner",
774
823
  "outputs": [
775
824
  {
776
- "internalType": "bytes4",
825
+ "internalType": "bool",
777
826
  "name": "",
778
- "type": "bytes4"
827
+ "type": "bool"
779
828
  }
780
829
  ],
781
- "payable": false,
782
- "stateMutability": "nonpayable",
830
+ "stateMutability": "view",
783
831
  "type": "function"
784
832
  },
785
833
  {
786
- "constant": true,
787
834
  "inputs": [],
788
835
  "name": "nonce",
789
836
  "outputs": [
@@ -793,12 +840,10 @@ export const GnosisSafe_jsonAbi = [
793
840
  "type": "uint256"
794
841
  }
795
842
  ],
796
- "payable": false,
797
843
  "stateMutability": "view",
798
844
  "type": "function"
799
845
  },
800
846
  {
801
- "constant": false,
802
847
  "inputs": [
803
848
  {
804
849
  "internalType": "address",
@@ -818,12 +863,10 @@ export const GnosisSafe_jsonAbi = [
818
863
  ],
819
864
  "name": "removeOwner",
820
865
  "outputs": [],
821
- "payable": false,
822
866
  "stateMutability": "nonpayable",
823
867
  "type": "function"
824
868
  },
825
869
  {
826
- "constant": false,
827
870
  "inputs": [
828
871
  {
829
872
  "internalType": "address",
@@ -854,12 +897,10 @@ export const GnosisSafe_jsonAbi = [
854
897
  "type": "uint256"
855
898
  }
856
899
  ],
857
- "payable": false,
858
900
  "stateMutability": "nonpayable",
859
901
  "type": "function"
860
902
  },
861
903
  {
862
- "constant": false,
863
904
  "inputs": [
864
905
  {
865
906
  "internalType": "address",
@@ -869,12 +910,23 @@ export const GnosisSafe_jsonAbi = [
869
910
  ],
870
911
  "name": "setFallbackHandler",
871
912
  "outputs": [],
872
- "payable": false,
873
913
  "stateMutability": "nonpayable",
874
914
  "type": "function"
875
915
  },
876
916
  {
877
- "constant": false,
917
+ "inputs": [
918
+ {
919
+ "internalType": "address",
920
+ "name": "guard",
921
+ "type": "address"
922
+ }
923
+ ],
924
+ "name": "setGuard",
925
+ "outputs": [],
926
+ "stateMutability": "nonpayable",
927
+ "type": "function"
928
+ },
929
+ {
878
930
  "inputs": [
879
931
  {
880
932
  "internalType": "address[]",
@@ -919,27 +971,10 @@ export const GnosisSafe_jsonAbi = [
919
971
  ],
920
972
  "name": "setup",
921
973
  "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
974
  "stateMutability": "nonpayable",
939
975
  "type": "function"
940
976
  },
941
977
  {
942
- "constant": true,
943
978
  "inputs": [
944
979
  {
945
980
  "internalType": "bytes32",
@@ -955,12 +990,28 @@ export const GnosisSafe_jsonAbi = [
955
990
  "type": "uint256"
956
991
  }
957
992
  ],
958
- "payable": false,
959
993
  "stateMutability": "view",
960
994
  "type": "function"
961
995
  },
962
996
  {
963
- "constant": false,
997
+ "inputs": [
998
+ {
999
+ "internalType": "address",
1000
+ "name": "targetContract",
1001
+ "type": "address"
1002
+ },
1003
+ {
1004
+ "internalType": "bytes",
1005
+ "name": "calldataPayload",
1006
+ "type": "bytes"
1007
+ }
1008
+ ],
1009
+ "name": "simulateAndRevert",
1010
+ "outputs": [],
1011
+ "stateMutability": "nonpayable",
1012
+ "type": "function"
1013
+ },
1014
+ {
964
1015
  "inputs": [
965
1016
  {
966
1017
  "internalType": "address",
@@ -980,9 +1031,12 @@ export const GnosisSafe_jsonAbi = [
980
1031
  ],
981
1032
  "name": "swapOwner",
982
1033
  "outputs": [],
983
- "payable": false,
984
1034
  "stateMutability": "nonpayable",
985
1035
  "type": "function"
1036
+ },
1037
+ {
1038
+ "stateMutability": "payable",
1039
+ "type": "receive"
986
1040
  }
987
1041
  ] as const satisfies Abi;
988
1042
 
@@ -1068,14 +1122,6 @@ export class GnosisSafe_json {
1068
1122
  return this.contract;
1069
1123
  }
1070
1124
 
1071
- /**
1072
- * NAME
1073
- * view
1074
- */
1075
- async NAME(): Promise<string> {
1076
- return this.contract.read.NAME() as Promise<string>;
1077
- }
1078
-
1079
1125
  /**
1080
1126
  * VERSION
1081
1127
  * view
@@ -1092,6 +1138,22 @@ export class GnosisSafe_json {
1092
1138
  return this.contract.read.approvedHashes([arg0, arg1] as const) as Promise<bigint>;
1093
1139
  }
1094
1140
 
1141
+ /**
1142
+ * checkNSignatures
1143
+ * view
1144
+ */
1145
+ async checkNSignatures(dataHash: `0x${string}`, data: `0x${string}`, signatures: `0x${string}`, requiredSignatures: bigint): Promise<void> {
1146
+ return this.contract.read.checkNSignatures([dataHash, data, signatures, requiredSignatures] as const) as Promise<void>;
1147
+ }
1148
+
1149
+ /**
1150
+ * checkSignatures
1151
+ * view
1152
+ */
1153
+ async checkSignatures(dataHash: `0x${string}`, data: `0x${string}`, signatures: `0x${string}`): Promise<void> {
1154
+ return this.contract.read.checkSignatures([dataHash, data, signatures] as const) as Promise<void>;
1155
+ }
1156
+
1095
1157
  /**
1096
1158
  * domainSeparator
1097
1159
  * view
@@ -1109,19 +1171,11 @@ export class GnosisSafe_json {
1109
1171
  }
1110
1172
 
1111
1173
  /**
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
1174
+ * getChainId
1121
1175
  * view
1122
1176
  */
1123
- async getModules(): Promise<`0x${string}`[]> {
1124
- return this.contract.read.getModules() as Promise<`0x${string}`[]>;
1177
+ async getChainId(): Promise<bigint> {
1178
+ return this.contract.read.getChainId() as Promise<bigint>;
1125
1179
  }
1126
1180
 
1127
1181
  /**
@@ -1140,6 +1194,14 @@ export class GnosisSafe_json {
1140
1194
  return this.contract.read.getOwners() as Promise<`0x${string}`[]>;
1141
1195
  }
1142
1196
 
1197
+ /**
1198
+ * getStorageAt
1199
+ * view
1200
+ */
1201
+ async getStorageAt(offset: bigint, length: bigint): Promise<`0x${string}`> {
1202
+ return this.contract.read.getStorageAt([offset, length] as const) as Promise<`0x${string}`>;
1203
+ }
1204
+
1143
1205
  /**
1144
1206
  * getThreshold
1145
1207
  * view
@@ -1156,6 +1218,14 @@ export class GnosisSafe_json {
1156
1218
  return this.contract.read.getTransactionHash([to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce] as const) as Promise<`0x${string}`>;
1157
1219
  }
1158
1220
 
1221
+ /**
1222
+ * isModuleEnabled
1223
+ * view
1224
+ */
1225
+ async isModuleEnabled(module: `0x${string}`): Promise<boolean> {
1226
+ return this.contract.read.isModuleEnabled([module] as const) as Promise<boolean>;
1227
+ }
1228
+
1159
1229
  /**
1160
1230
  * isOwner
1161
1231
  * view
@@ -1226,29 +1296,6 @@ export class GnosisSafe_json {
1226
1296
  return this.contract.write.approveHash([hashToApprove] as const, options) as Promise<`0x${string}`>;
1227
1297
  }
1228
1298
 
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
1299
  /**
1253
1300
  * changeThreshold
1254
1301
  * nonpayable
@@ -1320,7 +1367,7 @@ export class GnosisSafe_json {
1320
1367
 
1321
1368
  /**
1322
1369
  * execTransaction
1323
- * nonpayable
1370
+ * payable
1324
1371
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1325
1372
  */
1326
1373
  async execTransaction(to: `0x${string}`, value: bigint, data: `0x${string}`, operation: bigint, safeTxGas: bigint, baseGas: bigint, gasPrice: bigint, gasToken: `0x${string}`, refundReceiver: `0x${string}`, signatures: `0x${string}`, options?: {
@@ -1388,11 +1435,11 @@ export class GnosisSafe_json {
1388
1435
  }
1389
1436
 
1390
1437
  /**
1391
- * isValidSignature
1438
+ * removeOwner
1392
1439
  * nonpayable
1393
1440
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1394
1441
  */
1395
- async isValidSignature(_data: `0x${string}`, _signature: `0x${string}`, options?: {
1442
+ async removeOwner(prevOwner: `0x${string}`, owner: `0x${string}`, _threshold: bigint, options?: {
1396
1443
  accessList?: import('viem').AccessList;
1397
1444
  authorizationList?: import('viem').AuthorizationList;
1398
1445
  chain?: import('viem').Chain | null;
@@ -1407,15 +1454,15 @@ export class GnosisSafe_json {
1407
1454
  if (!this.contract.write) {
1408
1455
  throw new Error('Wallet client is required for write operations');
1409
1456
  }
1410
- return this.contract.write.isValidSignature([_data, _signature] as const, options) as Promise<`0x${string}`>;
1457
+ return this.contract.write.removeOwner([prevOwner, owner, _threshold] as const, options) as Promise<`0x${string}`>;
1411
1458
  }
1412
1459
 
1413
1460
  /**
1414
- * removeOwner
1461
+ * requiredTxGas
1415
1462
  * nonpayable
1416
1463
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1417
1464
  */
1418
- async removeOwner(prevOwner: `0x${string}`, owner: `0x${string}`, _threshold: bigint, options?: {
1465
+ async requiredTxGas(to: `0x${string}`, value: bigint, data: `0x${string}`, operation: bigint, options?: {
1419
1466
  accessList?: import('viem').AccessList;
1420
1467
  authorizationList?: import('viem').AuthorizationList;
1421
1468
  chain?: import('viem').Chain | null;
@@ -1430,15 +1477,15 @@ export class GnosisSafe_json {
1430
1477
  if (!this.contract.write) {
1431
1478
  throw new Error('Wallet client is required for write operations');
1432
1479
  }
1433
- return this.contract.write.removeOwner([prevOwner, owner, _threshold] as const, options) as Promise<`0x${string}`>;
1480
+ return this.contract.write.requiredTxGas([to, value, data, operation] as const, options) as Promise<`0x${string}`>;
1434
1481
  }
1435
1482
 
1436
1483
  /**
1437
- * requiredTxGas
1484
+ * setFallbackHandler
1438
1485
  * nonpayable
1439
1486
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1440
1487
  */
1441
- async requiredTxGas(to: `0x${string}`, value: bigint, data: `0x${string}`, operation: bigint, options?: {
1488
+ async setFallbackHandler(handler: `0x${string}`, options?: {
1442
1489
  accessList?: import('viem').AccessList;
1443
1490
  authorizationList?: import('viem').AuthorizationList;
1444
1491
  chain?: import('viem').Chain | null;
@@ -1453,15 +1500,15 @@ export class GnosisSafe_json {
1453
1500
  if (!this.contract.write) {
1454
1501
  throw new Error('Wallet client is required for write operations');
1455
1502
  }
1456
- return this.contract.write.requiredTxGas([to, value, data, operation] as const, options) as Promise<`0x${string}`>;
1503
+ return this.contract.write.setFallbackHandler([handler] as const, options) as Promise<`0x${string}`>;
1457
1504
  }
1458
1505
 
1459
1506
  /**
1460
- * setFallbackHandler
1507
+ * setGuard
1461
1508
  * nonpayable
1462
1509
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1463
1510
  */
1464
- async setFallbackHandler(handler: `0x${string}`, options?: {
1511
+ async setGuard(guard: `0x${string}`, options?: {
1465
1512
  accessList?: import('viem').AccessList;
1466
1513
  authorizationList?: import('viem').AuthorizationList;
1467
1514
  chain?: import('viem').Chain | null;
@@ -1476,7 +1523,7 @@ export class GnosisSafe_json {
1476
1523
  if (!this.contract.write) {
1477
1524
  throw new Error('Wallet client is required for write operations');
1478
1525
  }
1479
- return this.contract.write.setFallbackHandler([handler] as const, options) as Promise<`0x${string}`>;
1526
+ return this.contract.write.setGuard([guard] as const, options) as Promise<`0x${string}`>;
1480
1527
  }
1481
1528
 
1482
1529
  /**
@@ -1503,11 +1550,11 @@ export class GnosisSafe_json {
1503
1550
  }
1504
1551
 
1505
1552
  /**
1506
- * signMessage
1553
+ * simulateAndRevert
1507
1554
  * nonpayable
1508
1555
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1509
1556
  */
1510
- async signMessage(_data: `0x${string}`, options?: {
1557
+ async simulateAndRevert(targetContract: `0x${string}`, calldataPayload: `0x${string}`, options?: {
1511
1558
  accessList?: import('viem').AccessList;
1512
1559
  authorizationList?: import('viem').AuthorizationList;
1513
1560
  chain?: import('viem').Chain | null;
@@ -1522,7 +1569,7 @@ export class GnosisSafe_json {
1522
1569
  if (!this.contract.write) {
1523
1570
  throw new Error('Wallet client is required for write operations');
1524
1571
  }
1525
- return this.contract.write.signMessage([_data] as const, options) as Promise<`0x${string}`>;
1572
+ return this.contract.write.simulateAndRevert([targetContract, calldataPayload] as const, options) as Promise<`0x${string}`>;
1526
1573
  }
1527
1574
 
1528
1575
  /**
@@ -1602,25 +1649,6 @@ export class GnosisSafe_json {
1602
1649
  }): Promise<void> {
1603
1650
  return contract.simulate.approveHash([hashToApprove] as const, options) as Promise<void>;
1604
1651
  },
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
1652
  /**
1625
1653
  * Simulate changeThreshold
1626
1654
  * Returns gas estimate and result without sending transaction
@@ -1736,11 +1764,11 @@ export class GnosisSafe_json {
1736
1764
  return contract.simulate.execTransactionFromModuleReturnData([to, value, data, operation] as const, options) as Promise<[boolean, `0x${string}`]>;
1737
1765
  },
1738
1766
  /**
1739
- * Simulate isValidSignature
1767
+ * Simulate removeOwner
1740
1768
  * Returns gas estimate and result without sending transaction
1741
1769
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1742
1770
  */
1743
- async isValidSignature(_data: `0x${string}`, _signature: `0x${string}`, options?: {
1771
+ async removeOwner(prevOwner: `0x${string}`, owner: `0x${string}`, _threshold: bigint, options?: {
1744
1772
  accessList?: import('viem').AccessList;
1745
1773
  authorizationList?: import('viem').AuthorizationList;
1746
1774
  chain?: import('viem').Chain | null;
@@ -1751,15 +1779,15 @@ export class GnosisSafe_json {
1751
1779
  maxPriorityFeePerGas?: bigint;
1752
1780
  nonce?: number;
1753
1781
  value?: bigint;
1754
- }): Promise<`0x${string}`> {
1755
- return contract.simulate.isValidSignature([_data, _signature] as const, options) as Promise<`0x${string}`>;
1782
+ }): Promise<void> {
1783
+ return contract.simulate.removeOwner([prevOwner, owner, _threshold] as const, options) as Promise<void>;
1756
1784
  },
1757
1785
  /**
1758
- * Simulate removeOwner
1786
+ * Simulate requiredTxGas
1759
1787
  * Returns gas estimate and result without sending transaction
1760
1788
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1761
1789
  */
1762
- async removeOwner(prevOwner: `0x${string}`, owner: `0x${string}`, _threshold: bigint, options?: {
1790
+ async requiredTxGas(to: `0x${string}`, value: bigint, data: `0x${string}`, operation: bigint, options?: {
1763
1791
  accessList?: import('viem').AccessList;
1764
1792
  authorizationList?: import('viem').AuthorizationList;
1765
1793
  chain?: import('viem').Chain | null;
@@ -1770,15 +1798,15 @@ export class GnosisSafe_json {
1770
1798
  maxPriorityFeePerGas?: bigint;
1771
1799
  nonce?: number;
1772
1800
  value?: bigint;
1773
- }): Promise<void> {
1774
- return contract.simulate.removeOwner([prevOwner, owner, _threshold] as const, options) as Promise<void>;
1801
+ }): Promise<bigint> {
1802
+ return contract.simulate.requiredTxGas([to, value, data, operation] as const, options) as Promise<bigint>;
1775
1803
  },
1776
1804
  /**
1777
- * Simulate requiredTxGas
1805
+ * Simulate setFallbackHandler
1778
1806
  * Returns gas estimate and result without sending transaction
1779
1807
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1780
1808
  */
1781
- async requiredTxGas(to: `0x${string}`, value: bigint, data: `0x${string}`, operation: bigint, options?: {
1809
+ async setFallbackHandler(handler: `0x${string}`, options?: {
1782
1810
  accessList?: import('viem').AccessList;
1783
1811
  authorizationList?: import('viem').AuthorizationList;
1784
1812
  chain?: import('viem').Chain | null;
@@ -1789,15 +1817,15 @@ export class GnosisSafe_json {
1789
1817
  maxPriorityFeePerGas?: bigint;
1790
1818
  nonce?: number;
1791
1819
  value?: bigint;
1792
- }): Promise<bigint> {
1793
- return contract.simulate.requiredTxGas([to, value, data, operation] as const, options) as Promise<bigint>;
1820
+ }): Promise<void> {
1821
+ return contract.simulate.setFallbackHandler([handler] as const, options) as Promise<void>;
1794
1822
  },
1795
1823
  /**
1796
- * Simulate setFallbackHandler
1824
+ * Simulate setGuard
1797
1825
  * Returns gas estimate and result without sending transaction
1798
1826
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1799
1827
  */
1800
- async setFallbackHandler(handler: `0x${string}`, options?: {
1828
+ async setGuard(guard: `0x${string}`, options?: {
1801
1829
  accessList?: import('viem').AccessList;
1802
1830
  authorizationList?: import('viem').AuthorizationList;
1803
1831
  chain?: import('viem').Chain | null;
@@ -1809,7 +1837,7 @@ export class GnosisSafe_json {
1809
1837
  nonce?: number;
1810
1838
  value?: bigint;
1811
1839
  }): Promise<void> {
1812
- return contract.simulate.setFallbackHandler([handler] as const, options) as Promise<void>;
1840
+ return contract.simulate.setGuard([guard] as const, options) as Promise<void>;
1813
1841
  },
1814
1842
  /**
1815
1843
  * Simulate setup
@@ -1831,11 +1859,11 @@ export class GnosisSafe_json {
1831
1859
  return contract.simulate.setup([_owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver] as const, options) as Promise<void>;
1832
1860
  },
1833
1861
  /**
1834
- * Simulate signMessage
1862
+ * Simulate simulateAndRevert
1835
1863
  * Returns gas estimate and result without sending transaction
1836
1864
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1837
1865
  */
1838
- async signMessage(_data: `0x${string}`, options?: {
1866
+ async simulateAndRevert(targetContract: `0x${string}`, calldataPayload: `0x${string}`, options?: {
1839
1867
  accessList?: import('viem').AccessList;
1840
1868
  authorizationList?: import('viem').AuthorizationList;
1841
1869
  chain?: import('viem').Chain | null;
@@ -1847,7 +1875,7 @@ export class GnosisSafe_json {
1847
1875
  nonce?: number;
1848
1876
  value?: bigint;
1849
1877
  }): Promise<void> {
1850
- return contract.simulate.signMessage([_data] as const, options) as Promise<void>;
1878
+ return contract.simulate.simulateAndRevert([targetContract, calldataPayload] as const, options) as Promise<void>;
1851
1879
  },
1852
1880
  /**
1853
1881
  * Simulate swapOwner
@@ -1924,16 +1952,35 @@ export class GnosisSafe_json {
1924
1952
  }) as () => void;
1925
1953
  },
1926
1954
  /**
1927
- * Watch ChangedMasterCopy events
1955
+ * Watch ChangedFallbackHandler events
1928
1956
  * @param callback Function to call when event is emitted
1929
1957
  * @param filter Optional filter for indexed parameters
1930
1958
  * @returns Unwatch function to stop listening
1931
1959
  */
1932
- ChangedMasterCopy: (callback: (event: { masterCopy: `0x${string}` }) => void) => {
1960
+ ChangedFallbackHandler: (callback: (event: { handler: `0x${string}` }) => void) => {
1933
1961
  return this.publicClient.watchContractEvent({
1934
1962
  address: this.contractAddress,
1935
1963
  abi: GnosisSafe_jsonAbi,
1936
- eventName: 'ChangedMasterCopy',
1964
+ eventName: 'ChangedFallbackHandler',
1965
+
1966
+ onLogs: (logs: any[]) => {
1967
+ logs.forEach((log: any) => {
1968
+ callback(log.args as any);
1969
+ });
1970
+ },
1971
+ }) as () => void;
1972
+ },
1973
+ /**
1974
+ * Watch ChangedGuard events
1975
+ * @param callback Function to call when event is emitted
1976
+ * @param filter Optional filter for indexed parameters
1977
+ * @returns Unwatch function to stop listening
1978
+ */
1979
+ ChangedGuard: (callback: (event: { guard: `0x${string}` }) => void) => {
1980
+ return this.publicClient.watchContractEvent({
1981
+ address: this.contractAddress,
1982
+ abi: GnosisSafe_jsonAbi,
1983
+ eventName: 'ChangedGuard',
1937
1984
 
1938
1985
  onLogs: (logs: any[]) => {
1939
1986
  logs.forEach((log: any) => {
@@ -2094,6 +2141,44 @@ export class GnosisSafe_json {
2094
2141
  },
2095
2142
  }) as () => void;
2096
2143
  },
2144
+ /**
2145
+ * Watch SafeReceived events
2146
+ * @param callback Function to call when event is emitted
2147
+ * @param filter Optional filter for indexed parameters
2148
+ * @returns Unwatch function to stop listening
2149
+ */
2150
+ SafeReceived: (callback: (event: { sender: `0x${string}`; value: bigint }) => void, filter?: { sender: `0x${string}` }) => {
2151
+ return this.publicClient.watchContractEvent({
2152
+ address: this.contractAddress,
2153
+ abi: GnosisSafe_jsonAbi,
2154
+ eventName: 'SafeReceived',
2155
+ args: filter,
2156
+ onLogs: (logs: any[]) => {
2157
+ logs.forEach((log: any) => {
2158
+ callback(log.args as any);
2159
+ });
2160
+ },
2161
+ }) as () => void;
2162
+ },
2163
+ /**
2164
+ * Watch SafeSetup events
2165
+ * @param callback Function to call when event is emitted
2166
+ * @param filter Optional filter for indexed parameters
2167
+ * @returns Unwatch function to stop listening
2168
+ */
2169
+ SafeSetup: (callback: (event: { initiator: `0x${string}`; owners: `0x${string}`[]; threshold: bigint; initializer: `0x${string}`; fallbackHandler: `0x${string}` }) => void, filter?: { initiator: `0x${string}` }) => {
2170
+ return this.publicClient.watchContractEvent({
2171
+ address: this.contractAddress,
2172
+ abi: GnosisSafe_jsonAbi,
2173
+ eventName: 'SafeSetup',
2174
+ args: filter,
2175
+ onLogs: (logs: any[]) => {
2176
+ logs.forEach((log: any) => {
2177
+ callback(log.args as any);
2178
+ });
2179
+ },
2180
+ }) as () => void;
2181
+ },
2097
2182
  /**
2098
2183
  * Watch SignMsg events
2099
2184
  * @param callback Function to call when event is emitted