@gitmyabi/gnosissafe 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -0
- package/contracts/GnosisSafe_json.d.ts +1632 -0
- package/contracts/GnosisSafe_json.js +1806 -0
- package/contracts/GnosisSafe_json.ts +2203 -0
- package/contracts/Proxy_json.d.ts +89 -0
- package/contracts/Proxy_json.js +105 -0
- package/contracts/Proxy_json.ts +134 -0
- package/contracts/index.d.ts +4 -0
- package/contracts/index.js +10 -0
- package/contracts/index.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,1806 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GnosisSafe_json = exports.GnosisSafe_jsonAbi = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
/**
|
|
6
|
+
* GnosisSafe_json ABI
|
|
7
|
+
*
|
|
8
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
9
|
+
*/
|
|
10
|
+
exports.GnosisSafe_jsonAbi = [
|
|
11
|
+
{
|
|
12
|
+
"inputs": [],
|
|
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": "handler",
|
|
55
|
+
"type": "address"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"name": "ChangedFallbackHandler",
|
|
59
|
+
"type": "event"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"anonymous": false,
|
|
63
|
+
"inputs": [
|
|
64
|
+
{
|
|
65
|
+
"indexed": false,
|
|
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": false,
|
|
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": false,
|
|
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": false,
|
|
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": false,
|
|
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": false,
|
|
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": "to",
|
|
875
|
+
"type": "address"
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"internalType": "uint256",
|
|
879
|
+
"name": "value",
|
|
880
|
+
"type": "uint256"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"internalType": "bytes",
|
|
884
|
+
"name": "data",
|
|
885
|
+
"type": "bytes"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"internalType": "enum Enum.Operation",
|
|
889
|
+
"name": "operation",
|
|
890
|
+
"type": "uint8"
|
|
891
|
+
}
|
|
892
|
+
],
|
|
893
|
+
"name": "requiredTxGas",
|
|
894
|
+
"outputs": [
|
|
895
|
+
{
|
|
896
|
+
"internalType": "uint256",
|
|
897
|
+
"name": "",
|
|
898
|
+
"type": "uint256"
|
|
899
|
+
}
|
|
900
|
+
],
|
|
901
|
+
"stateMutability": "nonpayable",
|
|
902
|
+
"type": "function"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"inputs": [
|
|
906
|
+
{
|
|
907
|
+
"internalType": "address",
|
|
908
|
+
"name": "handler",
|
|
909
|
+
"type": "address"
|
|
910
|
+
}
|
|
911
|
+
],
|
|
912
|
+
"name": "setFallbackHandler",
|
|
913
|
+
"outputs": [],
|
|
914
|
+
"stateMutability": "nonpayable",
|
|
915
|
+
"type": "function"
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"inputs": [
|
|
919
|
+
{
|
|
920
|
+
"internalType": "address",
|
|
921
|
+
"name": "guard",
|
|
922
|
+
"type": "address"
|
|
923
|
+
}
|
|
924
|
+
],
|
|
925
|
+
"name": "setGuard",
|
|
926
|
+
"outputs": [],
|
|
927
|
+
"stateMutability": "nonpayable",
|
|
928
|
+
"type": "function"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"inputs": [
|
|
932
|
+
{
|
|
933
|
+
"internalType": "address[]",
|
|
934
|
+
"name": "_owners",
|
|
935
|
+
"type": "address[]"
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"internalType": "uint256",
|
|
939
|
+
"name": "_threshold",
|
|
940
|
+
"type": "uint256"
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"internalType": "address",
|
|
944
|
+
"name": "to",
|
|
945
|
+
"type": "address"
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"internalType": "bytes",
|
|
949
|
+
"name": "data",
|
|
950
|
+
"type": "bytes"
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
"internalType": "address",
|
|
954
|
+
"name": "fallbackHandler",
|
|
955
|
+
"type": "address"
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"internalType": "address",
|
|
959
|
+
"name": "paymentToken",
|
|
960
|
+
"type": "address"
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
"internalType": "uint256",
|
|
964
|
+
"name": "payment",
|
|
965
|
+
"type": "uint256"
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
"internalType": "address payable",
|
|
969
|
+
"name": "paymentReceiver",
|
|
970
|
+
"type": "address"
|
|
971
|
+
}
|
|
972
|
+
],
|
|
973
|
+
"name": "setup",
|
|
974
|
+
"outputs": [],
|
|
975
|
+
"stateMutability": "nonpayable",
|
|
976
|
+
"type": "function"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"inputs": [
|
|
980
|
+
{
|
|
981
|
+
"internalType": "bytes32",
|
|
982
|
+
"name": "",
|
|
983
|
+
"type": "bytes32"
|
|
984
|
+
}
|
|
985
|
+
],
|
|
986
|
+
"name": "signedMessages",
|
|
987
|
+
"outputs": [
|
|
988
|
+
{
|
|
989
|
+
"internalType": "uint256",
|
|
990
|
+
"name": "",
|
|
991
|
+
"type": "uint256"
|
|
992
|
+
}
|
|
993
|
+
],
|
|
994
|
+
"stateMutability": "view",
|
|
995
|
+
"type": "function"
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
"inputs": [
|
|
999
|
+
{
|
|
1000
|
+
"internalType": "address",
|
|
1001
|
+
"name": "targetContract",
|
|
1002
|
+
"type": "address"
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"internalType": "bytes",
|
|
1006
|
+
"name": "calldataPayload",
|
|
1007
|
+
"type": "bytes"
|
|
1008
|
+
}
|
|
1009
|
+
],
|
|
1010
|
+
"name": "simulateAndRevert",
|
|
1011
|
+
"outputs": [],
|
|
1012
|
+
"stateMutability": "nonpayable",
|
|
1013
|
+
"type": "function"
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
"inputs": [
|
|
1017
|
+
{
|
|
1018
|
+
"internalType": "address",
|
|
1019
|
+
"name": "prevOwner",
|
|
1020
|
+
"type": "address"
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"internalType": "address",
|
|
1024
|
+
"name": "oldOwner",
|
|
1025
|
+
"type": "address"
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
"internalType": "address",
|
|
1029
|
+
"name": "newOwner",
|
|
1030
|
+
"type": "address"
|
|
1031
|
+
}
|
|
1032
|
+
],
|
|
1033
|
+
"name": "swapOwner",
|
|
1034
|
+
"outputs": [],
|
|
1035
|
+
"stateMutability": "nonpayable",
|
|
1036
|
+
"type": "function"
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"stateMutability": "payable",
|
|
1040
|
+
"type": "receive"
|
|
1041
|
+
}
|
|
1042
|
+
];
|
|
1043
|
+
/**
|
|
1044
|
+
* GnosisSafe_json Contract Class
|
|
1045
|
+
*
|
|
1046
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1047
|
+
*
|
|
1048
|
+
* @example
|
|
1049
|
+
* ```typescript
|
|
1050
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1051
|
+
* import { mainnet } from 'viem/chains';
|
|
1052
|
+
* import { GnosisSafe_json } from 'GnosisSafe_json';
|
|
1053
|
+
*
|
|
1054
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1055
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1056
|
+
*
|
|
1057
|
+
* const contract = new GnosisSafe_json('0x...', { publicClient, walletClient });
|
|
1058
|
+
*
|
|
1059
|
+
* // Read functions
|
|
1060
|
+
* const result = await contract.balanceOf('0x...');
|
|
1061
|
+
*
|
|
1062
|
+
* // Write functions
|
|
1063
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
1064
|
+
*
|
|
1065
|
+
* // Simulate transactions (dry-run)
|
|
1066
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
1067
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
1068
|
+
*
|
|
1069
|
+
* // Watch events
|
|
1070
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1071
|
+
* console.log('Transfer event:', event);
|
|
1072
|
+
* });
|
|
1073
|
+
* ```
|
|
1074
|
+
*/
|
|
1075
|
+
class GnosisSafe_json {
|
|
1076
|
+
constructor(address, clients) {
|
|
1077
|
+
this.contractAddress = address;
|
|
1078
|
+
this.publicClient = clients.publicClient;
|
|
1079
|
+
this.contract = (0, viem_1.getContract)({
|
|
1080
|
+
address,
|
|
1081
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1082
|
+
client: {
|
|
1083
|
+
public: clients.publicClient,
|
|
1084
|
+
wallet: clients.walletClient,
|
|
1085
|
+
},
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* Get the contract address
|
|
1090
|
+
*/
|
|
1091
|
+
get address() {
|
|
1092
|
+
return this.contractAddress;
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* Get the underlying viem contract instance
|
|
1096
|
+
*/
|
|
1097
|
+
getContract() {
|
|
1098
|
+
return this.contract;
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* VERSION
|
|
1102
|
+
* view
|
|
1103
|
+
*/
|
|
1104
|
+
async VERSION() {
|
|
1105
|
+
return this.contract.read.VERSION();
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* approvedHashes
|
|
1109
|
+
* view
|
|
1110
|
+
*/
|
|
1111
|
+
async approvedHashes(arg0, arg1) {
|
|
1112
|
+
return this.contract.read.approvedHashes([arg0, arg1]);
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* checkNSignatures
|
|
1116
|
+
* view
|
|
1117
|
+
*/
|
|
1118
|
+
async checkNSignatures(dataHash, data, signatures, requiredSignatures) {
|
|
1119
|
+
return this.contract.read.checkNSignatures([dataHash, data, signatures, requiredSignatures]);
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* checkSignatures
|
|
1123
|
+
* view
|
|
1124
|
+
*/
|
|
1125
|
+
async checkSignatures(dataHash, data, signatures) {
|
|
1126
|
+
return this.contract.read.checkSignatures([dataHash, data, signatures]);
|
|
1127
|
+
}
|
|
1128
|
+
/**
|
|
1129
|
+
* domainSeparator
|
|
1130
|
+
* view
|
|
1131
|
+
*/
|
|
1132
|
+
async domainSeparator() {
|
|
1133
|
+
return this.contract.read.domainSeparator();
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* encodeTransactionData
|
|
1137
|
+
* view
|
|
1138
|
+
*/
|
|
1139
|
+
async encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce) {
|
|
1140
|
+
return this.contract.read.encodeTransactionData([to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce]);
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* getChainId
|
|
1144
|
+
* view
|
|
1145
|
+
*/
|
|
1146
|
+
async getChainId() {
|
|
1147
|
+
return this.contract.read.getChainId();
|
|
1148
|
+
}
|
|
1149
|
+
/**
|
|
1150
|
+
* getModulesPaginated
|
|
1151
|
+
* view
|
|
1152
|
+
*/
|
|
1153
|
+
async getModulesPaginated(start, pageSize) {
|
|
1154
|
+
return this.contract.read.getModulesPaginated([start, pageSize]);
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* getOwners
|
|
1158
|
+
* view
|
|
1159
|
+
*/
|
|
1160
|
+
async getOwners() {
|
|
1161
|
+
return this.contract.read.getOwners();
|
|
1162
|
+
}
|
|
1163
|
+
/**
|
|
1164
|
+
* getStorageAt
|
|
1165
|
+
* view
|
|
1166
|
+
*/
|
|
1167
|
+
async getStorageAt(offset, length) {
|
|
1168
|
+
return this.contract.read.getStorageAt([offset, length]);
|
|
1169
|
+
}
|
|
1170
|
+
/**
|
|
1171
|
+
* getThreshold
|
|
1172
|
+
* view
|
|
1173
|
+
*/
|
|
1174
|
+
async getThreshold() {
|
|
1175
|
+
return this.contract.read.getThreshold();
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* getTransactionHash
|
|
1179
|
+
* view
|
|
1180
|
+
*/
|
|
1181
|
+
async getTransactionHash(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce) {
|
|
1182
|
+
return this.contract.read.getTransactionHash([to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce]);
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* isModuleEnabled
|
|
1186
|
+
* view
|
|
1187
|
+
*/
|
|
1188
|
+
async isModuleEnabled(module) {
|
|
1189
|
+
return this.contract.read.isModuleEnabled([module]);
|
|
1190
|
+
}
|
|
1191
|
+
/**
|
|
1192
|
+
* isOwner
|
|
1193
|
+
* view
|
|
1194
|
+
*/
|
|
1195
|
+
async isOwner(owner) {
|
|
1196
|
+
return this.contract.read.isOwner([owner]);
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* nonce
|
|
1200
|
+
* view
|
|
1201
|
+
*/
|
|
1202
|
+
async nonce() {
|
|
1203
|
+
return this.contract.read.nonce();
|
|
1204
|
+
}
|
|
1205
|
+
/**
|
|
1206
|
+
* signedMessages
|
|
1207
|
+
* view
|
|
1208
|
+
*/
|
|
1209
|
+
async signedMessages(arg0) {
|
|
1210
|
+
return this.contract.read.signedMessages([arg0]);
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* addOwnerWithThreshold
|
|
1214
|
+
* nonpayable
|
|
1215
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1216
|
+
*/
|
|
1217
|
+
async addOwnerWithThreshold(owner, _threshold, options) {
|
|
1218
|
+
if (!this.contract.write) {
|
|
1219
|
+
throw new Error('Wallet client is required for write operations');
|
|
1220
|
+
}
|
|
1221
|
+
return this.contract.write.addOwnerWithThreshold([owner, _threshold], options);
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* approveHash
|
|
1225
|
+
* nonpayable
|
|
1226
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1227
|
+
*/
|
|
1228
|
+
async approveHash(hashToApprove, options) {
|
|
1229
|
+
if (!this.contract.write) {
|
|
1230
|
+
throw new Error('Wallet client is required for write operations');
|
|
1231
|
+
}
|
|
1232
|
+
return this.contract.write.approveHash([hashToApprove], options);
|
|
1233
|
+
}
|
|
1234
|
+
/**
|
|
1235
|
+
* changeThreshold
|
|
1236
|
+
* nonpayable
|
|
1237
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1238
|
+
*/
|
|
1239
|
+
async changeThreshold(_threshold, options) {
|
|
1240
|
+
if (!this.contract.write) {
|
|
1241
|
+
throw new Error('Wallet client is required for write operations');
|
|
1242
|
+
}
|
|
1243
|
+
return this.contract.write.changeThreshold([_threshold], options);
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* disableModule
|
|
1247
|
+
* nonpayable
|
|
1248
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1249
|
+
*/
|
|
1250
|
+
async disableModule(prevModule, module, options) {
|
|
1251
|
+
if (!this.contract.write) {
|
|
1252
|
+
throw new Error('Wallet client is required for write operations');
|
|
1253
|
+
}
|
|
1254
|
+
return this.contract.write.disableModule([prevModule, module], options);
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* enableModule
|
|
1258
|
+
* nonpayable
|
|
1259
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1260
|
+
*/
|
|
1261
|
+
async enableModule(module, options) {
|
|
1262
|
+
if (!this.contract.write) {
|
|
1263
|
+
throw new Error('Wallet client is required for write operations');
|
|
1264
|
+
}
|
|
1265
|
+
return this.contract.write.enableModule([module], options);
|
|
1266
|
+
}
|
|
1267
|
+
/**
|
|
1268
|
+
* execTransaction
|
|
1269
|
+
* payable
|
|
1270
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1271
|
+
*/
|
|
1272
|
+
async execTransaction(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures, options) {
|
|
1273
|
+
if (!this.contract.write) {
|
|
1274
|
+
throw new Error('Wallet client is required for write operations');
|
|
1275
|
+
}
|
|
1276
|
+
return this.contract.write.execTransaction([to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures], options);
|
|
1277
|
+
}
|
|
1278
|
+
/**
|
|
1279
|
+
* execTransactionFromModule
|
|
1280
|
+
* nonpayable
|
|
1281
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1282
|
+
*/
|
|
1283
|
+
async execTransactionFromModule(to, value, data, operation, options) {
|
|
1284
|
+
if (!this.contract.write) {
|
|
1285
|
+
throw new Error('Wallet client is required for write operations');
|
|
1286
|
+
}
|
|
1287
|
+
return this.contract.write.execTransactionFromModule([to, value, data, operation], options);
|
|
1288
|
+
}
|
|
1289
|
+
/**
|
|
1290
|
+
* execTransactionFromModuleReturnData
|
|
1291
|
+
* nonpayable
|
|
1292
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1293
|
+
*/
|
|
1294
|
+
async execTransactionFromModuleReturnData(to, value, data, operation, options) {
|
|
1295
|
+
if (!this.contract.write) {
|
|
1296
|
+
throw new Error('Wallet client is required for write operations');
|
|
1297
|
+
}
|
|
1298
|
+
return this.contract.write.execTransactionFromModuleReturnData([to, value, data, operation], options);
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* removeOwner
|
|
1302
|
+
* nonpayable
|
|
1303
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1304
|
+
*/
|
|
1305
|
+
async removeOwner(prevOwner, owner, _threshold, options) {
|
|
1306
|
+
if (!this.contract.write) {
|
|
1307
|
+
throw new Error('Wallet client is required for write operations');
|
|
1308
|
+
}
|
|
1309
|
+
return this.contract.write.removeOwner([prevOwner, owner, _threshold], options);
|
|
1310
|
+
}
|
|
1311
|
+
/**
|
|
1312
|
+
* requiredTxGas
|
|
1313
|
+
* nonpayable
|
|
1314
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1315
|
+
*/
|
|
1316
|
+
async requiredTxGas(to, value, data, operation, options) {
|
|
1317
|
+
if (!this.contract.write) {
|
|
1318
|
+
throw new Error('Wallet client is required for write operations');
|
|
1319
|
+
}
|
|
1320
|
+
return this.contract.write.requiredTxGas([to, value, data, operation], options);
|
|
1321
|
+
}
|
|
1322
|
+
/**
|
|
1323
|
+
* setFallbackHandler
|
|
1324
|
+
* nonpayable
|
|
1325
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1326
|
+
*/
|
|
1327
|
+
async setFallbackHandler(handler, options) {
|
|
1328
|
+
if (!this.contract.write) {
|
|
1329
|
+
throw new Error('Wallet client is required for write operations');
|
|
1330
|
+
}
|
|
1331
|
+
return this.contract.write.setFallbackHandler([handler], options);
|
|
1332
|
+
}
|
|
1333
|
+
/**
|
|
1334
|
+
* setGuard
|
|
1335
|
+
* nonpayable
|
|
1336
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1337
|
+
*/
|
|
1338
|
+
async setGuard(guard, options) {
|
|
1339
|
+
if (!this.contract.write) {
|
|
1340
|
+
throw new Error('Wallet client is required for write operations');
|
|
1341
|
+
}
|
|
1342
|
+
return this.contract.write.setGuard([guard], options);
|
|
1343
|
+
}
|
|
1344
|
+
/**
|
|
1345
|
+
* setup
|
|
1346
|
+
* nonpayable
|
|
1347
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1348
|
+
*/
|
|
1349
|
+
async setup(_owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver, options) {
|
|
1350
|
+
if (!this.contract.write) {
|
|
1351
|
+
throw new Error('Wallet client is required for write operations');
|
|
1352
|
+
}
|
|
1353
|
+
return this.contract.write.setup([_owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver], options);
|
|
1354
|
+
}
|
|
1355
|
+
/**
|
|
1356
|
+
* simulateAndRevert
|
|
1357
|
+
* nonpayable
|
|
1358
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1359
|
+
*/
|
|
1360
|
+
async simulateAndRevert(targetContract, calldataPayload, options) {
|
|
1361
|
+
if (!this.contract.write) {
|
|
1362
|
+
throw new Error('Wallet client is required for write operations');
|
|
1363
|
+
}
|
|
1364
|
+
return this.contract.write.simulateAndRevert([targetContract, calldataPayload], options);
|
|
1365
|
+
}
|
|
1366
|
+
/**
|
|
1367
|
+
* swapOwner
|
|
1368
|
+
* nonpayable
|
|
1369
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1370
|
+
*/
|
|
1371
|
+
async swapOwner(prevOwner, oldOwner, newOwner, options) {
|
|
1372
|
+
if (!this.contract.write) {
|
|
1373
|
+
throw new Error('Wallet client is required for write operations');
|
|
1374
|
+
}
|
|
1375
|
+
return this.contract.write.swapOwner([prevOwner, oldOwner, newOwner], options);
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
1379
|
+
*
|
|
1380
|
+
* @example
|
|
1381
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1382
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
1383
|
+
* console.log('Would succeed:', result.result);
|
|
1384
|
+
*/
|
|
1385
|
+
get simulate() {
|
|
1386
|
+
const contract = this.contract;
|
|
1387
|
+
if (!contract.simulate) {
|
|
1388
|
+
throw new Error('Public client is required for simulation');
|
|
1389
|
+
}
|
|
1390
|
+
return {
|
|
1391
|
+
/**
|
|
1392
|
+
* Simulate addOwnerWithThreshold
|
|
1393
|
+
* Returns gas estimate and result without sending transaction
|
|
1394
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1395
|
+
*/
|
|
1396
|
+
async addOwnerWithThreshold(owner, _threshold, options) {
|
|
1397
|
+
return contract.simulate.addOwnerWithThreshold([owner, _threshold], options);
|
|
1398
|
+
},
|
|
1399
|
+
/**
|
|
1400
|
+
* Simulate approveHash
|
|
1401
|
+
* Returns gas estimate and result without sending transaction
|
|
1402
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1403
|
+
*/
|
|
1404
|
+
async approveHash(hashToApprove, options) {
|
|
1405
|
+
return contract.simulate.approveHash([hashToApprove], options);
|
|
1406
|
+
},
|
|
1407
|
+
/**
|
|
1408
|
+
* Simulate changeThreshold
|
|
1409
|
+
* Returns gas estimate and result without sending transaction
|
|
1410
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1411
|
+
*/
|
|
1412
|
+
async changeThreshold(_threshold, options) {
|
|
1413
|
+
return contract.simulate.changeThreshold([_threshold], options);
|
|
1414
|
+
},
|
|
1415
|
+
/**
|
|
1416
|
+
* Simulate disableModule
|
|
1417
|
+
* Returns gas estimate and result without sending transaction
|
|
1418
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1419
|
+
*/
|
|
1420
|
+
async disableModule(prevModule, module, options) {
|
|
1421
|
+
return contract.simulate.disableModule([prevModule, module], options);
|
|
1422
|
+
},
|
|
1423
|
+
/**
|
|
1424
|
+
* Simulate enableModule
|
|
1425
|
+
* Returns gas estimate and result without sending transaction
|
|
1426
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1427
|
+
*/
|
|
1428
|
+
async enableModule(module, options) {
|
|
1429
|
+
return contract.simulate.enableModule([module], options);
|
|
1430
|
+
},
|
|
1431
|
+
/**
|
|
1432
|
+
* Simulate execTransaction
|
|
1433
|
+
* Returns gas estimate and result without sending transaction
|
|
1434
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1435
|
+
*/
|
|
1436
|
+
async execTransaction(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures, options) {
|
|
1437
|
+
return contract.simulate.execTransaction([to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures], options);
|
|
1438
|
+
},
|
|
1439
|
+
/**
|
|
1440
|
+
* Simulate execTransactionFromModule
|
|
1441
|
+
* Returns gas estimate and result without sending transaction
|
|
1442
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1443
|
+
*/
|
|
1444
|
+
async execTransactionFromModule(to, value, data, operation, options) {
|
|
1445
|
+
return contract.simulate.execTransactionFromModule([to, value, data, operation], options);
|
|
1446
|
+
},
|
|
1447
|
+
/**
|
|
1448
|
+
* Simulate execTransactionFromModuleReturnData
|
|
1449
|
+
* Returns gas estimate and result without sending transaction
|
|
1450
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1451
|
+
*/
|
|
1452
|
+
async execTransactionFromModuleReturnData(to, value, data, operation, options) {
|
|
1453
|
+
return contract.simulate.execTransactionFromModuleReturnData([to, value, data, operation], options);
|
|
1454
|
+
},
|
|
1455
|
+
/**
|
|
1456
|
+
* Simulate removeOwner
|
|
1457
|
+
* Returns gas estimate and result without sending transaction
|
|
1458
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1459
|
+
*/
|
|
1460
|
+
async removeOwner(prevOwner, owner, _threshold, options) {
|
|
1461
|
+
return contract.simulate.removeOwner([prevOwner, owner, _threshold], options);
|
|
1462
|
+
},
|
|
1463
|
+
/**
|
|
1464
|
+
* Simulate requiredTxGas
|
|
1465
|
+
* Returns gas estimate and result without sending transaction
|
|
1466
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1467
|
+
*/
|
|
1468
|
+
async requiredTxGas(to, value, data, operation, options) {
|
|
1469
|
+
return contract.simulate.requiredTxGas([to, value, data, operation], options);
|
|
1470
|
+
},
|
|
1471
|
+
/**
|
|
1472
|
+
* Simulate setFallbackHandler
|
|
1473
|
+
* Returns gas estimate and result without sending transaction
|
|
1474
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1475
|
+
*/
|
|
1476
|
+
async setFallbackHandler(handler, options) {
|
|
1477
|
+
return contract.simulate.setFallbackHandler([handler], options);
|
|
1478
|
+
},
|
|
1479
|
+
/**
|
|
1480
|
+
* Simulate setGuard
|
|
1481
|
+
* Returns gas estimate and result without sending transaction
|
|
1482
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1483
|
+
*/
|
|
1484
|
+
async setGuard(guard, options) {
|
|
1485
|
+
return contract.simulate.setGuard([guard], options);
|
|
1486
|
+
},
|
|
1487
|
+
/**
|
|
1488
|
+
* Simulate setup
|
|
1489
|
+
* Returns gas estimate and result without sending transaction
|
|
1490
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1491
|
+
*/
|
|
1492
|
+
async setup(_owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver, options) {
|
|
1493
|
+
return contract.simulate.setup([_owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver], options);
|
|
1494
|
+
},
|
|
1495
|
+
/**
|
|
1496
|
+
* Simulate simulateAndRevert
|
|
1497
|
+
* Returns gas estimate and result without sending transaction
|
|
1498
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1499
|
+
*/
|
|
1500
|
+
async simulateAndRevert(targetContract, calldataPayload, options) {
|
|
1501
|
+
return contract.simulate.simulateAndRevert([targetContract, calldataPayload], options);
|
|
1502
|
+
},
|
|
1503
|
+
/**
|
|
1504
|
+
* Simulate swapOwner
|
|
1505
|
+
* Returns gas estimate and result without sending transaction
|
|
1506
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1507
|
+
*/
|
|
1508
|
+
async swapOwner(prevOwner, oldOwner, newOwner, options) {
|
|
1509
|
+
return contract.simulate.swapOwner([prevOwner, oldOwner, newOwner], options);
|
|
1510
|
+
}
|
|
1511
|
+
};
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* Watch contract events
|
|
1515
|
+
*
|
|
1516
|
+
* @example
|
|
1517
|
+
* // Watch all Transfer events
|
|
1518
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1519
|
+
* console.log('Transfer:', event);
|
|
1520
|
+
* });
|
|
1521
|
+
*
|
|
1522
|
+
* // Stop watching
|
|
1523
|
+
* unwatch();
|
|
1524
|
+
*/
|
|
1525
|
+
get watch() {
|
|
1526
|
+
return {
|
|
1527
|
+
/**
|
|
1528
|
+
* Watch AddedOwner events
|
|
1529
|
+
* @param callback Function to call when event is emitted
|
|
1530
|
+
* @param filter Optional filter for indexed parameters
|
|
1531
|
+
* @returns Unwatch function to stop listening
|
|
1532
|
+
*/
|
|
1533
|
+
AddedOwner: (callback) => {
|
|
1534
|
+
return this.publicClient.watchContractEvent({
|
|
1535
|
+
address: this.contractAddress,
|
|
1536
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1537
|
+
eventName: 'AddedOwner',
|
|
1538
|
+
onLogs: (logs) => {
|
|
1539
|
+
logs.forEach((log) => {
|
|
1540
|
+
callback(log.args);
|
|
1541
|
+
});
|
|
1542
|
+
},
|
|
1543
|
+
});
|
|
1544
|
+
},
|
|
1545
|
+
/**
|
|
1546
|
+
* Watch ApproveHash events
|
|
1547
|
+
* @param callback Function to call when event is emitted
|
|
1548
|
+
* @param filter Optional filter for indexed parameters
|
|
1549
|
+
* @returns Unwatch function to stop listening
|
|
1550
|
+
*/
|
|
1551
|
+
ApproveHash: (callback, filter) => {
|
|
1552
|
+
return this.publicClient.watchContractEvent({
|
|
1553
|
+
address: this.contractAddress,
|
|
1554
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1555
|
+
eventName: 'ApproveHash',
|
|
1556
|
+
args: filter,
|
|
1557
|
+
onLogs: (logs) => {
|
|
1558
|
+
logs.forEach((log) => {
|
|
1559
|
+
callback(log.args);
|
|
1560
|
+
});
|
|
1561
|
+
},
|
|
1562
|
+
});
|
|
1563
|
+
},
|
|
1564
|
+
/**
|
|
1565
|
+
* Watch ChangedFallbackHandler events
|
|
1566
|
+
* @param callback Function to call when event is emitted
|
|
1567
|
+
* @param filter Optional filter for indexed parameters
|
|
1568
|
+
* @returns Unwatch function to stop listening
|
|
1569
|
+
*/
|
|
1570
|
+
ChangedFallbackHandler: (callback) => {
|
|
1571
|
+
return this.publicClient.watchContractEvent({
|
|
1572
|
+
address: this.contractAddress,
|
|
1573
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1574
|
+
eventName: 'ChangedFallbackHandler',
|
|
1575
|
+
onLogs: (logs) => {
|
|
1576
|
+
logs.forEach((log) => {
|
|
1577
|
+
callback(log.args);
|
|
1578
|
+
});
|
|
1579
|
+
},
|
|
1580
|
+
});
|
|
1581
|
+
},
|
|
1582
|
+
/**
|
|
1583
|
+
* Watch ChangedGuard events
|
|
1584
|
+
* @param callback Function to call when event is emitted
|
|
1585
|
+
* @param filter Optional filter for indexed parameters
|
|
1586
|
+
* @returns Unwatch function to stop listening
|
|
1587
|
+
*/
|
|
1588
|
+
ChangedGuard: (callback) => {
|
|
1589
|
+
return this.publicClient.watchContractEvent({
|
|
1590
|
+
address: this.contractAddress,
|
|
1591
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1592
|
+
eventName: 'ChangedGuard',
|
|
1593
|
+
onLogs: (logs) => {
|
|
1594
|
+
logs.forEach((log) => {
|
|
1595
|
+
callback(log.args);
|
|
1596
|
+
});
|
|
1597
|
+
},
|
|
1598
|
+
});
|
|
1599
|
+
},
|
|
1600
|
+
/**
|
|
1601
|
+
* Watch ChangedThreshold events
|
|
1602
|
+
* @param callback Function to call when event is emitted
|
|
1603
|
+
* @param filter Optional filter for indexed parameters
|
|
1604
|
+
* @returns Unwatch function to stop listening
|
|
1605
|
+
*/
|
|
1606
|
+
ChangedThreshold: (callback) => {
|
|
1607
|
+
return this.publicClient.watchContractEvent({
|
|
1608
|
+
address: this.contractAddress,
|
|
1609
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1610
|
+
eventName: 'ChangedThreshold',
|
|
1611
|
+
onLogs: (logs) => {
|
|
1612
|
+
logs.forEach((log) => {
|
|
1613
|
+
callback(log.args);
|
|
1614
|
+
});
|
|
1615
|
+
},
|
|
1616
|
+
});
|
|
1617
|
+
},
|
|
1618
|
+
/**
|
|
1619
|
+
* Watch DisabledModule events
|
|
1620
|
+
* @param callback Function to call when event is emitted
|
|
1621
|
+
* @param filter Optional filter for indexed parameters
|
|
1622
|
+
* @returns Unwatch function to stop listening
|
|
1623
|
+
*/
|
|
1624
|
+
DisabledModule: (callback) => {
|
|
1625
|
+
return this.publicClient.watchContractEvent({
|
|
1626
|
+
address: this.contractAddress,
|
|
1627
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1628
|
+
eventName: 'DisabledModule',
|
|
1629
|
+
onLogs: (logs) => {
|
|
1630
|
+
logs.forEach((log) => {
|
|
1631
|
+
callback(log.args);
|
|
1632
|
+
});
|
|
1633
|
+
},
|
|
1634
|
+
});
|
|
1635
|
+
},
|
|
1636
|
+
/**
|
|
1637
|
+
* Watch EnabledModule events
|
|
1638
|
+
* @param callback Function to call when event is emitted
|
|
1639
|
+
* @param filter Optional filter for indexed parameters
|
|
1640
|
+
* @returns Unwatch function to stop listening
|
|
1641
|
+
*/
|
|
1642
|
+
EnabledModule: (callback) => {
|
|
1643
|
+
return this.publicClient.watchContractEvent({
|
|
1644
|
+
address: this.contractAddress,
|
|
1645
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1646
|
+
eventName: 'EnabledModule',
|
|
1647
|
+
onLogs: (logs) => {
|
|
1648
|
+
logs.forEach((log) => {
|
|
1649
|
+
callback(log.args);
|
|
1650
|
+
});
|
|
1651
|
+
},
|
|
1652
|
+
});
|
|
1653
|
+
},
|
|
1654
|
+
/**
|
|
1655
|
+
* Watch ExecutionFailure events
|
|
1656
|
+
* @param callback Function to call when event is emitted
|
|
1657
|
+
* @param filter Optional filter for indexed parameters
|
|
1658
|
+
* @returns Unwatch function to stop listening
|
|
1659
|
+
*/
|
|
1660
|
+
ExecutionFailure: (callback) => {
|
|
1661
|
+
return this.publicClient.watchContractEvent({
|
|
1662
|
+
address: this.contractAddress,
|
|
1663
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1664
|
+
eventName: 'ExecutionFailure',
|
|
1665
|
+
onLogs: (logs) => {
|
|
1666
|
+
logs.forEach((log) => {
|
|
1667
|
+
callback(log.args);
|
|
1668
|
+
});
|
|
1669
|
+
},
|
|
1670
|
+
});
|
|
1671
|
+
},
|
|
1672
|
+
/**
|
|
1673
|
+
* Watch ExecutionFromModuleFailure events
|
|
1674
|
+
* @param callback Function to call when event is emitted
|
|
1675
|
+
* @param filter Optional filter for indexed parameters
|
|
1676
|
+
* @returns Unwatch function to stop listening
|
|
1677
|
+
*/
|
|
1678
|
+
ExecutionFromModuleFailure: (callback, filter) => {
|
|
1679
|
+
return this.publicClient.watchContractEvent({
|
|
1680
|
+
address: this.contractAddress,
|
|
1681
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1682
|
+
eventName: 'ExecutionFromModuleFailure',
|
|
1683
|
+
args: filter,
|
|
1684
|
+
onLogs: (logs) => {
|
|
1685
|
+
logs.forEach((log) => {
|
|
1686
|
+
callback(log.args);
|
|
1687
|
+
});
|
|
1688
|
+
},
|
|
1689
|
+
});
|
|
1690
|
+
},
|
|
1691
|
+
/**
|
|
1692
|
+
* Watch ExecutionFromModuleSuccess events
|
|
1693
|
+
* @param callback Function to call when event is emitted
|
|
1694
|
+
* @param filter Optional filter for indexed parameters
|
|
1695
|
+
* @returns Unwatch function to stop listening
|
|
1696
|
+
*/
|
|
1697
|
+
ExecutionFromModuleSuccess: (callback, filter) => {
|
|
1698
|
+
return this.publicClient.watchContractEvent({
|
|
1699
|
+
address: this.contractAddress,
|
|
1700
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1701
|
+
eventName: 'ExecutionFromModuleSuccess',
|
|
1702
|
+
args: filter,
|
|
1703
|
+
onLogs: (logs) => {
|
|
1704
|
+
logs.forEach((log) => {
|
|
1705
|
+
callback(log.args);
|
|
1706
|
+
});
|
|
1707
|
+
},
|
|
1708
|
+
});
|
|
1709
|
+
},
|
|
1710
|
+
/**
|
|
1711
|
+
* Watch ExecutionSuccess events
|
|
1712
|
+
* @param callback Function to call when event is emitted
|
|
1713
|
+
* @param filter Optional filter for indexed parameters
|
|
1714
|
+
* @returns Unwatch function to stop listening
|
|
1715
|
+
*/
|
|
1716
|
+
ExecutionSuccess: (callback) => {
|
|
1717
|
+
return this.publicClient.watchContractEvent({
|
|
1718
|
+
address: this.contractAddress,
|
|
1719
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1720
|
+
eventName: 'ExecutionSuccess',
|
|
1721
|
+
onLogs: (logs) => {
|
|
1722
|
+
logs.forEach((log) => {
|
|
1723
|
+
callback(log.args);
|
|
1724
|
+
});
|
|
1725
|
+
},
|
|
1726
|
+
});
|
|
1727
|
+
},
|
|
1728
|
+
/**
|
|
1729
|
+
* Watch RemovedOwner events
|
|
1730
|
+
* @param callback Function to call when event is emitted
|
|
1731
|
+
* @param filter Optional filter for indexed parameters
|
|
1732
|
+
* @returns Unwatch function to stop listening
|
|
1733
|
+
*/
|
|
1734
|
+
RemovedOwner: (callback) => {
|
|
1735
|
+
return this.publicClient.watchContractEvent({
|
|
1736
|
+
address: this.contractAddress,
|
|
1737
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1738
|
+
eventName: 'RemovedOwner',
|
|
1739
|
+
onLogs: (logs) => {
|
|
1740
|
+
logs.forEach((log) => {
|
|
1741
|
+
callback(log.args);
|
|
1742
|
+
});
|
|
1743
|
+
},
|
|
1744
|
+
});
|
|
1745
|
+
},
|
|
1746
|
+
/**
|
|
1747
|
+
* Watch SafeReceived events
|
|
1748
|
+
* @param callback Function to call when event is emitted
|
|
1749
|
+
* @param filter Optional filter for indexed parameters
|
|
1750
|
+
* @returns Unwatch function to stop listening
|
|
1751
|
+
*/
|
|
1752
|
+
SafeReceived: (callback, filter) => {
|
|
1753
|
+
return this.publicClient.watchContractEvent({
|
|
1754
|
+
address: this.contractAddress,
|
|
1755
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1756
|
+
eventName: 'SafeReceived',
|
|
1757
|
+
args: filter,
|
|
1758
|
+
onLogs: (logs) => {
|
|
1759
|
+
logs.forEach((log) => {
|
|
1760
|
+
callback(log.args);
|
|
1761
|
+
});
|
|
1762
|
+
},
|
|
1763
|
+
});
|
|
1764
|
+
},
|
|
1765
|
+
/**
|
|
1766
|
+
* Watch SafeSetup events
|
|
1767
|
+
* @param callback Function to call when event is emitted
|
|
1768
|
+
* @param filter Optional filter for indexed parameters
|
|
1769
|
+
* @returns Unwatch function to stop listening
|
|
1770
|
+
*/
|
|
1771
|
+
SafeSetup: (callback, filter) => {
|
|
1772
|
+
return this.publicClient.watchContractEvent({
|
|
1773
|
+
address: this.contractAddress,
|
|
1774
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1775
|
+
eventName: 'SafeSetup',
|
|
1776
|
+
args: filter,
|
|
1777
|
+
onLogs: (logs) => {
|
|
1778
|
+
logs.forEach((log) => {
|
|
1779
|
+
callback(log.args);
|
|
1780
|
+
});
|
|
1781
|
+
},
|
|
1782
|
+
});
|
|
1783
|
+
},
|
|
1784
|
+
/**
|
|
1785
|
+
* Watch SignMsg events
|
|
1786
|
+
* @param callback Function to call when event is emitted
|
|
1787
|
+
* @param filter Optional filter for indexed parameters
|
|
1788
|
+
* @returns Unwatch function to stop listening
|
|
1789
|
+
*/
|
|
1790
|
+
SignMsg: (callback, filter) => {
|
|
1791
|
+
return this.publicClient.watchContractEvent({
|
|
1792
|
+
address: this.contractAddress,
|
|
1793
|
+
abi: exports.GnosisSafe_jsonAbi,
|
|
1794
|
+
eventName: 'SignMsg',
|
|
1795
|
+
args: filter,
|
|
1796
|
+
onLogs: (logs) => {
|
|
1797
|
+
logs.forEach((log) => {
|
|
1798
|
+
callback(log.args);
|
|
1799
|
+
});
|
|
1800
|
+
},
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
};
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
exports.GnosisSafe_json = GnosisSafe_json;
|