Skip to content

Commit 64f74d7

Browse files
authored
Add Module v0.2.0 Deployment (#12)
This PR adds the new v0.2.0 canonical 4337 module deployment. Note that we additionally **removed the old v0.1.0 deployment** because of a known medium severity issue with the module.
1 parent dcf458e commit 64f74d7

File tree

3 files changed

+75
-58
lines changed

3 files changed

+75
-58
lines changed

src/assets/safe-4337-module/v0.1.0/add-modules-lib.json renamed to src/assets/safe-4337-module/v0.2.0/add-modules-lib.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"released": true,
33
"contractName": "AddModulesLib",
4-
"version": "0.1.0",
4+
"version": "0.2.0",
55
"networkAddresses": {
6-
"5": "0x191EFDC03615B575922289DC339F4c70aC5C30Af",
7-
"137": "0x191EFDC03615B575922289DC339F4c70aC5C30Af",
8-
"80001": "0x191EFDC03615B575922289DC339F4c70aC5C30Af",
9-
"11155111": "0x191EFDC03615B575922289DC339F4c70aC5C30Af"
6+
"5": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
7+
"137": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
8+
"80001": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
9+
"11155111": "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb"
1010
},
1111
"abi": [
1212
{

src/assets/safe-4337-module/v0.1.0/safe-4337-module.json renamed to src/assets/safe-4337-module/v0.2.0/safe-4337-module.json

Lines changed: 66 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"released": true,
33
"contractName": "Safe4337Module",
4-
"version": "0.1.0",
4+
"version": "0.2.0",
55
"networkAddresses": {
6-
"5": "0x39E54Bb2b3Aa444b4B39DEe15De3b7809c36Fc38",
7-
"137": "0x39E54Bb2b3Aa444b4B39DEe15De3b7809c36Fc38",
8-
"80001": "0x39E54Bb2b3Aa444b4B39DEe15De3b7809c36Fc38",
9-
"11155111": "0x39E54Bb2b3Aa444b4B39DEe15De3b7809c36Fc38"
6+
"5": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
7+
"137": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
8+
"80001": "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
9+
"11155111": "0xa581c4A4DB7175302464fF3C06380BC3270b4037"
1010
},
1111
"abi": [
1212
{
@@ -185,56 +185,73 @@
185185
{
186186
"inputs": [
187187
{
188-
"internalType": "address",
189-
"name": "safe",
190-
"type": "address"
191-
},
192-
{
193-
"internalType": "bytes",
194-
"name": "callData",
195-
"type": "bytes"
196-
},
197-
{
198-
"internalType": "uint256",
199-
"name": "nonce",
200-
"type": "uint256"
201-
},
202-
{
203-
"internalType": "uint256",
204-
"name": "preVerificationGas",
205-
"type": "uint256"
206-
},
207-
{
208-
"internalType": "uint256",
209-
"name": "verificationGasLimit",
210-
"type": "uint256"
211-
},
212-
{
213-
"internalType": "uint256",
214-
"name": "callGasLimit",
215-
"type": "uint256"
216-
},
217-
{
218-
"internalType": "uint256",
219-
"name": "maxFeePerGas",
220-
"type": "uint256"
221-
},
222-
{
223-
"internalType": "uint256",
224-
"name": "maxPriorityFeePerGas",
225-
"type": "uint256"
226-
},
227-
{
228-
"internalType": "address",
229-
"name": "entryPoint",
230-
"type": "address"
188+
"components": [
189+
{
190+
"internalType": "address",
191+
"name": "sender",
192+
"type": "address"
193+
},
194+
{
195+
"internalType": "uint256",
196+
"name": "nonce",
197+
"type": "uint256"
198+
},
199+
{
200+
"internalType": "bytes",
201+
"name": "initCode",
202+
"type": "bytes"
203+
},
204+
{
205+
"internalType": "bytes",
206+
"name": "callData",
207+
"type": "bytes"
208+
},
209+
{
210+
"internalType": "uint256",
211+
"name": "callGasLimit",
212+
"type": "uint256"
213+
},
214+
{
215+
"internalType": "uint256",
216+
"name": "verificationGasLimit",
217+
"type": "uint256"
218+
},
219+
{
220+
"internalType": "uint256",
221+
"name": "preVerificationGas",
222+
"type": "uint256"
223+
},
224+
{
225+
"internalType": "uint256",
226+
"name": "maxFeePerGas",
227+
"type": "uint256"
228+
},
229+
{
230+
"internalType": "uint256",
231+
"name": "maxPriorityFeePerGas",
232+
"type": "uint256"
233+
},
234+
{
235+
"internalType": "bytes",
236+
"name": "paymasterAndData",
237+
"type": "bytes"
238+
},
239+
{
240+
"internalType": "bytes",
241+
"name": "signature",
242+
"type": "bytes"
243+
}
244+
],
245+
"internalType": "struct UserOperation",
246+
"name": "userOp",
247+
"type": "tuple"
231248
}
232249
],
233250
"name": "getOperationHash",
234251
"outputs": [
235252
{
236253
"internalType": "bytes32",
237-
"name": "",
254+
"name": "operationHash",
238255
"type": "bytes32"
239256
}
240257
],

src/safe-4337-module.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import Safe4337Module010 from './assets/safe-4337-module/v0.1.0/safe-4337-module.json';
2-
import AddModulesLib010 from './assets/safe-4337-module/v0.1.0/add-modules-lib.json';
1+
import Safe4337Module020 from './assets/safe-4337-module/v0.2.0/safe-4337-module.json';
2+
import AddModulesLib020 from './assets/safe-4337-module/v0.2.0/add-modules-lib.json';
33
import { DeploymentFilter, Deployment } from './types';
44
import { applyFilterDefaults, findDeployment } from './utils';
55

66
// The array should be sorted from the latest version to the oldest.
7-
const SAFE_4337_MODULE_DEPLOYMENTS: Deployment[] = [Safe4337Module010];
8-
const ADD_MODULES_LIB_DEPLOYMENTS: Deployment[] = [AddModulesLib010];
7+
const SAFE_4337_MODULE_DEPLOYMENTS: Deployment[] = [Safe4337Module020];
8+
const ADD_MODULES_LIB_DEPLOYMENTS: Deployment[] = [AddModulesLib020];
99

1010
export const getSafe4337ModuleDeployment = (filter?: DeploymentFilter): Deployment | undefined => {
1111
return findDeployment(applyFilterDefaults(filter), SAFE_4337_MODULE_DEPLOYMENTS);

0 commit comments

Comments
 (0)