@safe-global/safe-modules-deployments 2.0.0 → 2.1.1

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.
@@ -7,6 +7,7 @@
7
7
  "10": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
8
8
  "100": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
9
9
  "137": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
10
+ "8453": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
10
11
  "42161": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
11
12
  "42220": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
12
13
  "80001": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
@@ -7,6 +7,7 @@
7
7
  "10": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
8
8
  "100": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
9
9
  "137": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
10
+ "8453": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
10
11
  "42161": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
11
12
  "42220": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
12
13
  "80001": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
@@ -0,0 +1,597 @@
1
+ {
2
+ "released": true,
3
+ "contractName": "Safe4337Module",
4
+ "version": "0.3.0",
5
+ "networkAddresses": {
6
+ "11155111": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226"
7
+ },
8
+ "abi": [
9
+ {
10
+ "inputs": [
11
+ {
12
+ "internalType": "address",
13
+ "name": "entryPoint",
14
+ "type": "address"
15
+ }
16
+ ],
17
+ "stateMutability": "nonpayable",
18
+ "type": "constructor"
19
+ },
20
+ {
21
+ "inputs": [],
22
+ "name": "ExecutionFailed",
23
+ "type": "error"
24
+ },
25
+ {
26
+ "inputs": [],
27
+ "name": "InvalidCaller",
28
+ "type": "error"
29
+ },
30
+ {
31
+ "inputs": [],
32
+ "name": "InvalidEntryPoint",
33
+ "type": "error"
34
+ },
35
+ {
36
+ "inputs": [],
37
+ "name": "UnsupportedEntryPoint",
38
+ "type": "error"
39
+ },
40
+ {
41
+ "inputs": [
42
+ {
43
+ "internalType": "bytes4",
44
+ "name": "selector",
45
+ "type": "bytes4"
46
+ }
47
+ ],
48
+ "name": "UnsupportedExecutionFunction",
49
+ "type": "error"
50
+ },
51
+ {
52
+ "inputs": [],
53
+ "name": "SUPPORTED_ENTRYPOINT",
54
+ "outputs": [
55
+ {
56
+ "internalType": "address",
57
+ "name": "",
58
+ "type": "address"
59
+ }
60
+ ],
61
+ "stateMutability": "view",
62
+ "type": "function"
63
+ },
64
+ {
65
+ "inputs": [],
66
+ "name": "domainSeparator",
67
+ "outputs": [
68
+ {
69
+ "internalType": "bytes32",
70
+ "name": "domainSeparatorHash",
71
+ "type": "bytes32"
72
+ }
73
+ ],
74
+ "stateMutability": "view",
75
+ "type": "function"
76
+ },
77
+ {
78
+ "inputs": [
79
+ {
80
+ "internalType": "contract Safe",
81
+ "name": "safe",
82
+ "type": "address"
83
+ },
84
+ {
85
+ "internalType": "bytes",
86
+ "name": "message",
87
+ "type": "bytes"
88
+ }
89
+ ],
90
+ "name": "encodeMessageDataForSafe",
91
+ "outputs": [
92
+ {
93
+ "internalType": "bytes",
94
+ "name": "",
95
+ "type": "bytes"
96
+ }
97
+ ],
98
+ "stateMutability": "view",
99
+ "type": "function"
100
+ },
101
+ {
102
+ "inputs": [
103
+ {
104
+ "internalType": "address",
105
+ "name": "to",
106
+ "type": "address"
107
+ },
108
+ {
109
+ "internalType": "uint256",
110
+ "name": "value",
111
+ "type": "uint256"
112
+ },
113
+ {
114
+ "internalType": "bytes",
115
+ "name": "data",
116
+ "type": "bytes"
117
+ },
118
+ {
119
+ "internalType": "uint8",
120
+ "name": "operation",
121
+ "type": "uint8"
122
+ }
123
+ ],
124
+ "name": "executeUserOp",
125
+ "outputs": [],
126
+ "stateMutability": "nonpayable",
127
+ "type": "function"
128
+ },
129
+ {
130
+ "inputs": [
131
+ {
132
+ "internalType": "address",
133
+ "name": "to",
134
+ "type": "address"
135
+ },
136
+ {
137
+ "internalType": "uint256",
138
+ "name": "value",
139
+ "type": "uint256"
140
+ },
141
+ {
142
+ "internalType": "bytes",
143
+ "name": "data",
144
+ "type": "bytes"
145
+ },
146
+ {
147
+ "internalType": "uint8",
148
+ "name": "operation",
149
+ "type": "uint8"
150
+ }
151
+ ],
152
+ "name": "executeUserOpWithErrorString",
153
+ "outputs": [],
154
+ "stateMutability": "nonpayable",
155
+ "type": "function"
156
+ },
157
+ {
158
+ "inputs": [
159
+ {
160
+ "internalType": "bytes",
161
+ "name": "message",
162
+ "type": "bytes"
163
+ }
164
+ ],
165
+ "name": "getMessageHash",
166
+ "outputs": [
167
+ {
168
+ "internalType": "bytes32",
169
+ "name": "",
170
+ "type": "bytes32"
171
+ }
172
+ ],
173
+ "stateMutability": "view",
174
+ "type": "function"
175
+ },
176
+ {
177
+ "inputs": [
178
+ {
179
+ "internalType": "contract Safe",
180
+ "name": "safe",
181
+ "type": "address"
182
+ },
183
+ {
184
+ "internalType": "bytes",
185
+ "name": "message",
186
+ "type": "bytes"
187
+ }
188
+ ],
189
+ "name": "getMessageHashForSafe",
190
+ "outputs": [
191
+ {
192
+ "internalType": "bytes32",
193
+ "name": "",
194
+ "type": "bytes32"
195
+ }
196
+ ],
197
+ "stateMutability": "view",
198
+ "type": "function"
199
+ },
200
+ {
201
+ "inputs": [],
202
+ "name": "getModules",
203
+ "outputs": [
204
+ {
205
+ "internalType": "address[]",
206
+ "name": "",
207
+ "type": "address[]"
208
+ }
209
+ ],
210
+ "stateMutability": "view",
211
+ "type": "function"
212
+ },
213
+ {
214
+ "inputs": [
215
+ {
216
+ "components": [
217
+ {
218
+ "internalType": "address",
219
+ "name": "sender",
220
+ "type": "address"
221
+ },
222
+ {
223
+ "internalType": "uint256",
224
+ "name": "nonce",
225
+ "type": "uint256"
226
+ },
227
+ {
228
+ "internalType": "bytes",
229
+ "name": "initCode",
230
+ "type": "bytes"
231
+ },
232
+ {
233
+ "internalType": "bytes",
234
+ "name": "callData",
235
+ "type": "bytes"
236
+ },
237
+ {
238
+ "internalType": "bytes32",
239
+ "name": "accountGasLimits",
240
+ "type": "bytes32"
241
+ },
242
+ {
243
+ "internalType": "uint256",
244
+ "name": "preVerificationGas",
245
+ "type": "uint256"
246
+ },
247
+ {
248
+ "internalType": "bytes32",
249
+ "name": "gasFees",
250
+ "type": "bytes32"
251
+ },
252
+ {
253
+ "internalType": "bytes",
254
+ "name": "paymasterAndData",
255
+ "type": "bytes"
256
+ },
257
+ {
258
+ "internalType": "bytes",
259
+ "name": "signature",
260
+ "type": "bytes"
261
+ }
262
+ ],
263
+ "internalType": "struct PackedUserOperation",
264
+ "name": "userOp",
265
+ "type": "tuple"
266
+ }
267
+ ],
268
+ "name": "getOperationHash",
269
+ "outputs": [
270
+ {
271
+ "internalType": "bytes32",
272
+ "name": "operationHash",
273
+ "type": "bytes32"
274
+ }
275
+ ],
276
+ "stateMutability": "view",
277
+ "type": "function"
278
+ },
279
+ {
280
+ "inputs": [
281
+ {
282
+ "internalType": "bytes32",
283
+ "name": "_dataHash",
284
+ "type": "bytes32"
285
+ },
286
+ {
287
+ "internalType": "bytes",
288
+ "name": "_signature",
289
+ "type": "bytes"
290
+ }
291
+ ],
292
+ "name": "isValidSignature",
293
+ "outputs": [
294
+ {
295
+ "internalType": "bytes4",
296
+ "name": "",
297
+ "type": "bytes4"
298
+ }
299
+ ],
300
+ "stateMutability": "view",
301
+ "type": "function"
302
+ },
303
+ {
304
+ "inputs": [
305
+ {
306
+ "internalType": "bytes",
307
+ "name": "_data",
308
+ "type": "bytes"
309
+ },
310
+ {
311
+ "internalType": "bytes",
312
+ "name": "_signature",
313
+ "type": "bytes"
314
+ }
315
+ ],
316
+ "name": "isValidSignature",
317
+ "outputs": [
318
+ {
319
+ "internalType": "bytes4",
320
+ "name": "",
321
+ "type": "bytes4"
322
+ }
323
+ ],
324
+ "stateMutability": "view",
325
+ "type": "function"
326
+ },
327
+ {
328
+ "inputs": [
329
+ {
330
+ "internalType": "address",
331
+ "name": "",
332
+ "type": "address"
333
+ },
334
+ {
335
+ "internalType": "address",
336
+ "name": "",
337
+ "type": "address"
338
+ },
339
+ {
340
+ "internalType": "uint256[]",
341
+ "name": "",
342
+ "type": "uint256[]"
343
+ },
344
+ {
345
+ "internalType": "uint256[]",
346
+ "name": "",
347
+ "type": "uint256[]"
348
+ },
349
+ {
350
+ "internalType": "bytes",
351
+ "name": "",
352
+ "type": "bytes"
353
+ }
354
+ ],
355
+ "name": "onERC1155BatchReceived",
356
+ "outputs": [
357
+ {
358
+ "internalType": "bytes4",
359
+ "name": "",
360
+ "type": "bytes4"
361
+ }
362
+ ],
363
+ "stateMutability": "pure",
364
+ "type": "function"
365
+ },
366
+ {
367
+ "inputs": [
368
+ {
369
+ "internalType": "address",
370
+ "name": "",
371
+ "type": "address"
372
+ },
373
+ {
374
+ "internalType": "address",
375
+ "name": "",
376
+ "type": "address"
377
+ },
378
+ {
379
+ "internalType": "uint256",
380
+ "name": "",
381
+ "type": "uint256"
382
+ },
383
+ {
384
+ "internalType": "uint256",
385
+ "name": "",
386
+ "type": "uint256"
387
+ },
388
+ {
389
+ "internalType": "bytes",
390
+ "name": "",
391
+ "type": "bytes"
392
+ }
393
+ ],
394
+ "name": "onERC1155Received",
395
+ "outputs": [
396
+ {
397
+ "internalType": "bytes4",
398
+ "name": "",
399
+ "type": "bytes4"
400
+ }
401
+ ],
402
+ "stateMutability": "pure",
403
+ "type": "function"
404
+ },
405
+ {
406
+ "inputs": [
407
+ {
408
+ "internalType": "address",
409
+ "name": "",
410
+ "type": "address"
411
+ },
412
+ {
413
+ "internalType": "address",
414
+ "name": "",
415
+ "type": "address"
416
+ },
417
+ {
418
+ "internalType": "uint256",
419
+ "name": "",
420
+ "type": "uint256"
421
+ },
422
+ {
423
+ "internalType": "bytes",
424
+ "name": "",
425
+ "type": "bytes"
426
+ }
427
+ ],
428
+ "name": "onERC721Received",
429
+ "outputs": [
430
+ {
431
+ "internalType": "bytes4",
432
+ "name": "",
433
+ "type": "bytes4"
434
+ }
435
+ ],
436
+ "stateMutability": "pure",
437
+ "type": "function"
438
+ },
439
+ {
440
+ "inputs": [
441
+ {
442
+ "internalType": "address",
443
+ "name": "targetContract",
444
+ "type": "address"
445
+ },
446
+ {
447
+ "internalType": "bytes",
448
+ "name": "calldataPayload",
449
+ "type": "bytes"
450
+ }
451
+ ],
452
+ "name": "simulate",
453
+ "outputs": [
454
+ {
455
+ "internalType": "bytes",
456
+ "name": "response",
457
+ "type": "bytes"
458
+ }
459
+ ],
460
+ "stateMutability": "nonpayable",
461
+ "type": "function"
462
+ },
463
+ {
464
+ "inputs": [
465
+ {
466
+ "internalType": "bytes4",
467
+ "name": "interfaceId",
468
+ "type": "bytes4"
469
+ }
470
+ ],
471
+ "name": "supportsInterface",
472
+ "outputs": [
473
+ {
474
+ "internalType": "bool",
475
+ "name": "",
476
+ "type": "bool"
477
+ }
478
+ ],
479
+ "stateMutability": "view",
480
+ "type": "function"
481
+ },
482
+ {
483
+ "inputs": [
484
+ {
485
+ "internalType": "address",
486
+ "name": "",
487
+ "type": "address"
488
+ },
489
+ {
490
+ "internalType": "address",
491
+ "name": "",
492
+ "type": "address"
493
+ },
494
+ {
495
+ "internalType": "address",
496
+ "name": "",
497
+ "type": "address"
498
+ },
499
+ {
500
+ "internalType": "uint256",
501
+ "name": "",
502
+ "type": "uint256"
503
+ },
504
+ {
505
+ "internalType": "bytes",
506
+ "name": "",
507
+ "type": "bytes"
508
+ },
509
+ {
510
+ "internalType": "bytes",
511
+ "name": "",
512
+ "type": "bytes"
513
+ }
514
+ ],
515
+ "name": "tokensReceived",
516
+ "outputs": [],
517
+ "stateMutability": "pure",
518
+ "type": "function"
519
+ },
520
+ {
521
+ "inputs": [
522
+ {
523
+ "components": [
524
+ {
525
+ "internalType": "address",
526
+ "name": "sender",
527
+ "type": "address"
528
+ },
529
+ {
530
+ "internalType": "uint256",
531
+ "name": "nonce",
532
+ "type": "uint256"
533
+ },
534
+ {
535
+ "internalType": "bytes",
536
+ "name": "initCode",
537
+ "type": "bytes"
538
+ },
539
+ {
540
+ "internalType": "bytes",
541
+ "name": "callData",
542
+ "type": "bytes"
543
+ },
544
+ {
545
+ "internalType": "bytes32",
546
+ "name": "accountGasLimits",
547
+ "type": "bytes32"
548
+ },
549
+ {
550
+ "internalType": "uint256",
551
+ "name": "preVerificationGas",
552
+ "type": "uint256"
553
+ },
554
+ {
555
+ "internalType": "bytes32",
556
+ "name": "gasFees",
557
+ "type": "bytes32"
558
+ },
559
+ {
560
+ "internalType": "bytes",
561
+ "name": "paymasterAndData",
562
+ "type": "bytes"
563
+ },
564
+ {
565
+ "internalType": "bytes",
566
+ "name": "signature",
567
+ "type": "bytes"
568
+ }
569
+ ],
570
+ "internalType": "struct PackedUserOperation",
571
+ "name": "userOp",
572
+ "type": "tuple"
573
+ },
574
+ {
575
+ "internalType": "bytes32",
576
+ "name": "",
577
+ "type": "bytes32"
578
+ },
579
+ {
580
+ "internalType": "uint256",
581
+ "name": "missingAccountFunds",
582
+ "type": "uint256"
583
+ }
584
+ ],
585
+ "name": "validateUserOp",
586
+ "outputs": [
587
+ {
588
+ "internalType": "uint256",
589
+ "name": "validationData",
590
+ "type": "uint256"
591
+ }
592
+ ],
593
+ "stateMutability": "nonpayable",
594
+ "type": "function"
595
+ }
596
+ ]
597
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "released": true,
3
+ "contractName": "SafeModuleSetup",
4
+ "version": "0.3.0",
5
+ "networkAddresses": {
6
+ "11155111": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47"
7
+ },
8
+ "abi": [
9
+ {
10
+ "inputs": [
11
+ {
12
+ "internalType": "address[]",
13
+ "name": "modules",
14
+ "type": "address[]"
15
+ }
16
+ ],
17
+ "name": "enableModules",
18
+ "outputs": [],
19
+ "stateMutability": "nonpayable",
20
+ "type": "function"
21
+ }
22
+ ]
23
+ }
@@ -1,3 +1,4 @@
1
1
  import { DeploymentFilter, Deployment } from './types';
2
2
  export declare const getSafe4337ModuleDeployment: (filter?: DeploymentFilter | undefined) => Deployment | undefined;
3
+ export declare const getSafeModuleSetupDeployment: (filter?: DeploymentFilter | undefined) => Deployment | undefined;
3
4
  export declare const getAddModulesLibDeployment: (filter?: DeploymentFilter | undefined) => Deployment | undefined;
@@ -3,18 +3,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getAddModulesLibDeployment = exports.getSafe4337ModuleDeployment = void 0;
7
- const safe_4337_module_json_1 = __importDefault(require("./assets/safe-4337-module/v0.2.0/safe-4337-module.json"));
6
+ exports.getAddModulesLibDeployment = exports.getSafeModuleSetupDeployment = exports.getSafe4337ModuleDeployment = void 0;
7
+ const safe_4337_module_json_1 = __importDefault(require("./assets/safe-4337-module/v0.3.0/safe-4337-module.json"));
8
+ const safe_4337_module_json_2 = __importDefault(require("./assets/safe-4337-module/v0.2.0/safe-4337-module.json"));
9
+ const safe_module_setup_json_1 = __importDefault(require("./assets/safe-4337-module/v0.3.0/safe-module-setup.json"));
8
10
  const add_modules_lib_json_1 = __importDefault(require("./assets/safe-4337-module/v0.2.0/add-modules-lib.json"));
9
11
  const utils_1 = require("./utils");
10
12
  // The array should be sorted from the latest version to the oldest.
11
- const SAFE_4337_MODULE_DEPLOYMENTS = [safe_4337_module_json_1.default];
12
- const ADD_MODULES_LIB_DEPLOYMENTS = [add_modules_lib_json_1.default];
13
+ const SAFE_4337_MODULE_DEPLOYMENTS = [safe_4337_module_json_1.default, safe_4337_module_json_2.default];
14
+ const SAFE_MODULE_SETUP_DEPLOYMENTS = [safe_module_setup_json_1.default, add_modules_lib_json_1.default];
13
15
  const getSafe4337ModuleDeployment = (filter) => {
14
16
  return (0, utils_1.findDeployment)((0, utils_1.applyFilterDefaults)(filter), SAFE_4337_MODULE_DEPLOYMENTS);
15
17
  };
16
18
  exports.getSafe4337ModuleDeployment = getSafe4337ModuleDeployment;
17
- const getAddModulesLibDeployment = (filter) => {
18
- return (0, utils_1.findDeployment)((0, utils_1.applyFilterDefaults)(filter), ADD_MODULES_LIB_DEPLOYMENTS);
19
+ const getSafeModuleSetupDeployment = (filter) => {
20
+ return (0, utils_1.findDeployment)((0, utils_1.applyFilterDefaults)(filter), SAFE_MODULE_SETUP_DEPLOYMENTS);
19
21
  };
20
- exports.getAddModulesLibDeployment = getAddModulesLibDeployment;
22
+ exports.getSafeModuleSetupDeployment = getSafeModuleSetupDeployment;
23
+ // From v0.2 to v0.3, the `AddModulesLib` contract was renamed to `SafeModuleSetup` while preserving
24
+ // its interface and functionality. As such, we consider both contracts to be the same with respect
25
+ // to deployments, and expose an alias for the `AddModulesLib` name for backwards compatibility.
26
+ exports.getAddModulesLibDeployment = exports.getSafeModuleSetupDeployment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@safe-global/safe-modules-deployments",
3
- "version": "2.0.0",
3
+ "version": "2.1.1",
4
4
  "description": "Collection of Safe Modules singleton deployments",
5
5
  "homepage": "https://github.com/safe-global/safe-modules-deployments/",
6
6
  "license": "MIT",
@@ -7,6 +7,7 @@
7
7
  "10": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
8
8
  "100": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
9
9
  "137": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
10
+ "8453": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
10
11
  "42161": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
11
12
  "42220": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
12
13
  "80001": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
@@ -7,6 +7,7 @@
7
7
  "10": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
8
8
  "100": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
9
9
  "137": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
10
+ "8453": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
10
11
  "42161": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
11
12
  "42220": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
12
13
  "80001": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
@@ -0,0 +1,597 @@
1
+ {
2
+ "released": true,
3
+ "contractName": "Safe4337Module",
4
+ "version": "0.3.0",
5
+ "networkAddresses": {
6
+ "11155111": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226"
7
+ },
8
+ "abi": [
9
+ {
10
+ "inputs": [
11
+ {
12
+ "internalType": "address",
13
+ "name": "entryPoint",
14
+ "type": "address"
15
+ }
16
+ ],
17
+ "stateMutability": "nonpayable",
18
+ "type": "constructor"
19
+ },
20
+ {
21
+ "inputs": [],
22
+ "name": "ExecutionFailed",
23
+ "type": "error"
24
+ },
25
+ {
26
+ "inputs": [],
27
+ "name": "InvalidCaller",
28
+ "type": "error"
29
+ },
30
+ {
31
+ "inputs": [],
32
+ "name": "InvalidEntryPoint",
33
+ "type": "error"
34
+ },
35
+ {
36
+ "inputs": [],
37
+ "name": "UnsupportedEntryPoint",
38
+ "type": "error"
39
+ },
40
+ {
41
+ "inputs": [
42
+ {
43
+ "internalType": "bytes4",
44
+ "name": "selector",
45
+ "type": "bytes4"
46
+ }
47
+ ],
48
+ "name": "UnsupportedExecutionFunction",
49
+ "type": "error"
50
+ },
51
+ {
52
+ "inputs": [],
53
+ "name": "SUPPORTED_ENTRYPOINT",
54
+ "outputs": [
55
+ {
56
+ "internalType": "address",
57
+ "name": "",
58
+ "type": "address"
59
+ }
60
+ ],
61
+ "stateMutability": "view",
62
+ "type": "function"
63
+ },
64
+ {
65
+ "inputs": [],
66
+ "name": "domainSeparator",
67
+ "outputs": [
68
+ {
69
+ "internalType": "bytes32",
70
+ "name": "domainSeparatorHash",
71
+ "type": "bytes32"
72
+ }
73
+ ],
74
+ "stateMutability": "view",
75
+ "type": "function"
76
+ },
77
+ {
78
+ "inputs": [
79
+ {
80
+ "internalType": "contract Safe",
81
+ "name": "safe",
82
+ "type": "address"
83
+ },
84
+ {
85
+ "internalType": "bytes",
86
+ "name": "message",
87
+ "type": "bytes"
88
+ }
89
+ ],
90
+ "name": "encodeMessageDataForSafe",
91
+ "outputs": [
92
+ {
93
+ "internalType": "bytes",
94
+ "name": "",
95
+ "type": "bytes"
96
+ }
97
+ ],
98
+ "stateMutability": "view",
99
+ "type": "function"
100
+ },
101
+ {
102
+ "inputs": [
103
+ {
104
+ "internalType": "address",
105
+ "name": "to",
106
+ "type": "address"
107
+ },
108
+ {
109
+ "internalType": "uint256",
110
+ "name": "value",
111
+ "type": "uint256"
112
+ },
113
+ {
114
+ "internalType": "bytes",
115
+ "name": "data",
116
+ "type": "bytes"
117
+ },
118
+ {
119
+ "internalType": "uint8",
120
+ "name": "operation",
121
+ "type": "uint8"
122
+ }
123
+ ],
124
+ "name": "executeUserOp",
125
+ "outputs": [],
126
+ "stateMutability": "nonpayable",
127
+ "type": "function"
128
+ },
129
+ {
130
+ "inputs": [
131
+ {
132
+ "internalType": "address",
133
+ "name": "to",
134
+ "type": "address"
135
+ },
136
+ {
137
+ "internalType": "uint256",
138
+ "name": "value",
139
+ "type": "uint256"
140
+ },
141
+ {
142
+ "internalType": "bytes",
143
+ "name": "data",
144
+ "type": "bytes"
145
+ },
146
+ {
147
+ "internalType": "uint8",
148
+ "name": "operation",
149
+ "type": "uint8"
150
+ }
151
+ ],
152
+ "name": "executeUserOpWithErrorString",
153
+ "outputs": [],
154
+ "stateMutability": "nonpayable",
155
+ "type": "function"
156
+ },
157
+ {
158
+ "inputs": [
159
+ {
160
+ "internalType": "bytes",
161
+ "name": "message",
162
+ "type": "bytes"
163
+ }
164
+ ],
165
+ "name": "getMessageHash",
166
+ "outputs": [
167
+ {
168
+ "internalType": "bytes32",
169
+ "name": "",
170
+ "type": "bytes32"
171
+ }
172
+ ],
173
+ "stateMutability": "view",
174
+ "type": "function"
175
+ },
176
+ {
177
+ "inputs": [
178
+ {
179
+ "internalType": "contract Safe",
180
+ "name": "safe",
181
+ "type": "address"
182
+ },
183
+ {
184
+ "internalType": "bytes",
185
+ "name": "message",
186
+ "type": "bytes"
187
+ }
188
+ ],
189
+ "name": "getMessageHashForSafe",
190
+ "outputs": [
191
+ {
192
+ "internalType": "bytes32",
193
+ "name": "",
194
+ "type": "bytes32"
195
+ }
196
+ ],
197
+ "stateMutability": "view",
198
+ "type": "function"
199
+ },
200
+ {
201
+ "inputs": [],
202
+ "name": "getModules",
203
+ "outputs": [
204
+ {
205
+ "internalType": "address[]",
206
+ "name": "",
207
+ "type": "address[]"
208
+ }
209
+ ],
210
+ "stateMutability": "view",
211
+ "type": "function"
212
+ },
213
+ {
214
+ "inputs": [
215
+ {
216
+ "components": [
217
+ {
218
+ "internalType": "address",
219
+ "name": "sender",
220
+ "type": "address"
221
+ },
222
+ {
223
+ "internalType": "uint256",
224
+ "name": "nonce",
225
+ "type": "uint256"
226
+ },
227
+ {
228
+ "internalType": "bytes",
229
+ "name": "initCode",
230
+ "type": "bytes"
231
+ },
232
+ {
233
+ "internalType": "bytes",
234
+ "name": "callData",
235
+ "type": "bytes"
236
+ },
237
+ {
238
+ "internalType": "bytes32",
239
+ "name": "accountGasLimits",
240
+ "type": "bytes32"
241
+ },
242
+ {
243
+ "internalType": "uint256",
244
+ "name": "preVerificationGas",
245
+ "type": "uint256"
246
+ },
247
+ {
248
+ "internalType": "bytes32",
249
+ "name": "gasFees",
250
+ "type": "bytes32"
251
+ },
252
+ {
253
+ "internalType": "bytes",
254
+ "name": "paymasterAndData",
255
+ "type": "bytes"
256
+ },
257
+ {
258
+ "internalType": "bytes",
259
+ "name": "signature",
260
+ "type": "bytes"
261
+ }
262
+ ],
263
+ "internalType": "struct PackedUserOperation",
264
+ "name": "userOp",
265
+ "type": "tuple"
266
+ }
267
+ ],
268
+ "name": "getOperationHash",
269
+ "outputs": [
270
+ {
271
+ "internalType": "bytes32",
272
+ "name": "operationHash",
273
+ "type": "bytes32"
274
+ }
275
+ ],
276
+ "stateMutability": "view",
277
+ "type": "function"
278
+ },
279
+ {
280
+ "inputs": [
281
+ {
282
+ "internalType": "bytes32",
283
+ "name": "_dataHash",
284
+ "type": "bytes32"
285
+ },
286
+ {
287
+ "internalType": "bytes",
288
+ "name": "_signature",
289
+ "type": "bytes"
290
+ }
291
+ ],
292
+ "name": "isValidSignature",
293
+ "outputs": [
294
+ {
295
+ "internalType": "bytes4",
296
+ "name": "",
297
+ "type": "bytes4"
298
+ }
299
+ ],
300
+ "stateMutability": "view",
301
+ "type": "function"
302
+ },
303
+ {
304
+ "inputs": [
305
+ {
306
+ "internalType": "bytes",
307
+ "name": "_data",
308
+ "type": "bytes"
309
+ },
310
+ {
311
+ "internalType": "bytes",
312
+ "name": "_signature",
313
+ "type": "bytes"
314
+ }
315
+ ],
316
+ "name": "isValidSignature",
317
+ "outputs": [
318
+ {
319
+ "internalType": "bytes4",
320
+ "name": "",
321
+ "type": "bytes4"
322
+ }
323
+ ],
324
+ "stateMutability": "view",
325
+ "type": "function"
326
+ },
327
+ {
328
+ "inputs": [
329
+ {
330
+ "internalType": "address",
331
+ "name": "",
332
+ "type": "address"
333
+ },
334
+ {
335
+ "internalType": "address",
336
+ "name": "",
337
+ "type": "address"
338
+ },
339
+ {
340
+ "internalType": "uint256[]",
341
+ "name": "",
342
+ "type": "uint256[]"
343
+ },
344
+ {
345
+ "internalType": "uint256[]",
346
+ "name": "",
347
+ "type": "uint256[]"
348
+ },
349
+ {
350
+ "internalType": "bytes",
351
+ "name": "",
352
+ "type": "bytes"
353
+ }
354
+ ],
355
+ "name": "onERC1155BatchReceived",
356
+ "outputs": [
357
+ {
358
+ "internalType": "bytes4",
359
+ "name": "",
360
+ "type": "bytes4"
361
+ }
362
+ ],
363
+ "stateMutability": "pure",
364
+ "type": "function"
365
+ },
366
+ {
367
+ "inputs": [
368
+ {
369
+ "internalType": "address",
370
+ "name": "",
371
+ "type": "address"
372
+ },
373
+ {
374
+ "internalType": "address",
375
+ "name": "",
376
+ "type": "address"
377
+ },
378
+ {
379
+ "internalType": "uint256",
380
+ "name": "",
381
+ "type": "uint256"
382
+ },
383
+ {
384
+ "internalType": "uint256",
385
+ "name": "",
386
+ "type": "uint256"
387
+ },
388
+ {
389
+ "internalType": "bytes",
390
+ "name": "",
391
+ "type": "bytes"
392
+ }
393
+ ],
394
+ "name": "onERC1155Received",
395
+ "outputs": [
396
+ {
397
+ "internalType": "bytes4",
398
+ "name": "",
399
+ "type": "bytes4"
400
+ }
401
+ ],
402
+ "stateMutability": "pure",
403
+ "type": "function"
404
+ },
405
+ {
406
+ "inputs": [
407
+ {
408
+ "internalType": "address",
409
+ "name": "",
410
+ "type": "address"
411
+ },
412
+ {
413
+ "internalType": "address",
414
+ "name": "",
415
+ "type": "address"
416
+ },
417
+ {
418
+ "internalType": "uint256",
419
+ "name": "",
420
+ "type": "uint256"
421
+ },
422
+ {
423
+ "internalType": "bytes",
424
+ "name": "",
425
+ "type": "bytes"
426
+ }
427
+ ],
428
+ "name": "onERC721Received",
429
+ "outputs": [
430
+ {
431
+ "internalType": "bytes4",
432
+ "name": "",
433
+ "type": "bytes4"
434
+ }
435
+ ],
436
+ "stateMutability": "pure",
437
+ "type": "function"
438
+ },
439
+ {
440
+ "inputs": [
441
+ {
442
+ "internalType": "address",
443
+ "name": "targetContract",
444
+ "type": "address"
445
+ },
446
+ {
447
+ "internalType": "bytes",
448
+ "name": "calldataPayload",
449
+ "type": "bytes"
450
+ }
451
+ ],
452
+ "name": "simulate",
453
+ "outputs": [
454
+ {
455
+ "internalType": "bytes",
456
+ "name": "response",
457
+ "type": "bytes"
458
+ }
459
+ ],
460
+ "stateMutability": "nonpayable",
461
+ "type": "function"
462
+ },
463
+ {
464
+ "inputs": [
465
+ {
466
+ "internalType": "bytes4",
467
+ "name": "interfaceId",
468
+ "type": "bytes4"
469
+ }
470
+ ],
471
+ "name": "supportsInterface",
472
+ "outputs": [
473
+ {
474
+ "internalType": "bool",
475
+ "name": "",
476
+ "type": "bool"
477
+ }
478
+ ],
479
+ "stateMutability": "view",
480
+ "type": "function"
481
+ },
482
+ {
483
+ "inputs": [
484
+ {
485
+ "internalType": "address",
486
+ "name": "",
487
+ "type": "address"
488
+ },
489
+ {
490
+ "internalType": "address",
491
+ "name": "",
492
+ "type": "address"
493
+ },
494
+ {
495
+ "internalType": "address",
496
+ "name": "",
497
+ "type": "address"
498
+ },
499
+ {
500
+ "internalType": "uint256",
501
+ "name": "",
502
+ "type": "uint256"
503
+ },
504
+ {
505
+ "internalType": "bytes",
506
+ "name": "",
507
+ "type": "bytes"
508
+ },
509
+ {
510
+ "internalType": "bytes",
511
+ "name": "",
512
+ "type": "bytes"
513
+ }
514
+ ],
515
+ "name": "tokensReceived",
516
+ "outputs": [],
517
+ "stateMutability": "pure",
518
+ "type": "function"
519
+ },
520
+ {
521
+ "inputs": [
522
+ {
523
+ "components": [
524
+ {
525
+ "internalType": "address",
526
+ "name": "sender",
527
+ "type": "address"
528
+ },
529
+ {
530
+ "internalType": "uint256",
531
+ "name": "nonce",
532
+ "type": "uint256"
533
+ },
534
+ {
535
+ "internalType": "bytes",
536
+ "name": "initCode",
537
+ "type": "bytes"
538
+ },
539
+ {
540
+ "internalType": "bytes",
541
+ "name": "callData",
542
+ "type": "bytes"
543
+ },
544
+ {
545
+ "internalType": "bytes32",
546
+ "name": "accountGasLimits",
547
+ "type": "bytes32"
548
+ },
549
+ {
550
+ "internalType": "uint256",
551
+ "name": "preVerificationGas",
552
+ "type": "uint256"
553
+ },
554
+ {
555
+ "internalType": "bytes32",
556
+ "name": "gasFees",
557
+ "type": "bytes32"
558
+ },
559
+ {
560
+ "internalType": "bytes",
561
+ "name": "paymasterAndData",
562
+ "type": "bytes"
563
+ },
564
+ {
565
+ "internalType": "bytes",
566
+ "name": "signature",
567
+ "type": "bytes"
568
+ }
569
+ ],
570
+ "internalType": "struct PackedUserOperation",
571
+ "name": "userOp",
572
+ "type": "tuple"
573
+ },
574
+ {
575
+ "internalType": "bytes32",
576
+ "name": "",
577
+ "type": "bytes32"
578
+ },
579
+ {
580
+ "internalType": "uint256",
581
+ "name": "missingAccountFunds",
582
+ "type": "uint256"
583
+ }
584
+ ],
585
+ "name": "validateUserOp",
586
+ "outputs": [
587
+ {
588
+ "internalType": "uint256",
589
+ "name": "validationData",
590
+ "type": "uint256"
591
+ }
592
+ ],
593
+ "stateMutability": "nonpayable",
594
+ "type": "function"
595
+ }
596
+ ]
597
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "released": true,
3
+ "contractName": "SafeModuleSetup",
4
+ "version": "0.3.0",
5
+ "networkAddresses": {
6
+ "11155111": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47"
7
+ },
8
+ "abi": [
9
+ {
10
+ "inputs": [
11
+ {
12
+ "internalType": "address[]",
13
+ "name": "modules",
14
+ "type": "address[]"
15
+ }
16
+ ],
17
+ "name": "enableModules",
18
+ "outputs": [],
19
+ "stateMutability": "nonpayable",
20
+ "type": "function"
21
+ }
22
+ ]
23
+ }
@@ -1,16 +1,23 @@
1
+ import Safe4337Module030 from './assets/safe-4337-module/v0.3.0/safe-4337-module.json';
1
2
  import Safe4337Module020 from './assets/safe-4337-module/v0.2.0/safe-4337-module.json';
3
+ import SafeModuleSetup030 from './assets/safe-4337-module/v0.3.0/safe-module-setup.json';
2
4
  import AddModulesLib020 from './assets/safe-4337-module/v0.2.0/add-modules-lib.json';
3
5
  import { DeploymentFilter, Deployment } from './types';
4
6
  import { applyFilterDefaults, findDeployment } from './utils';
5
7
 
6
8
  // The array should be sorted from the latest version to the oldest.
7
- const SAFE_4337_MODULE_DEPLOYMENTS: Deployment[] = [Safe4337Module020];
8
- const ADD_MODULES_LIB_DEPLOYMENTS: Deployment[] = [AddModulesLib020];
9
+ const SAFE_4337_MODULE_DEPLOYMENTS: Deployment[] = [Safe4337Module030, Safe4337Module020];
10
+ const SAFE_MODULE_SETUP_DEPLOYMENTS: Deployment[] = [SafeModuleSetup030, AddModulesLib020];
9
11
 
10
12
  export const getSafe4337ModuleDeployment = (filter?: DeploymentFilter): Deployment | undefined => {
11
13
  return findDeployment(applyFilterDefaults(filter), SAFE_4337_MODULE_DEPLOYMENTS);
12
14
  };
13
15
 
14
- export const getAddModulesLibDeployment = (filter?: DeploymentFilter): Deployment | undefined => {
15
- return findDeployment(applyFilterDefaults(filter), ADD_MODULES_LIB_DEPLOYMENTS);
16
+ export const getSafeModuleSetupDeployment = (filter?: DeploymentFilter): Deployment | undefined => {
17
+ return findDeployment(applyFilterDefaults(filter), SAFE_MODULE_SETUP_DEPLOYMENTS);
16
18
  };
19
+
20
+ // From v0.2 to v0.3, the `AddModulesLib` contract was renamed to `SafeModuleSetup` while preserving
21
+ // its interface and functionality. As such, we consider both contracts to be the same with respect
22
+ // to deployments, and expose an alias for the `AddModulesLib` name for backwards compatibility.
23
+ export const getAddModulesLibDeployment = getSafeModuleSetupDeployment;