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