@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 +12 -12
- package/dist/allowance-module.d.ts +2 -2
- package/dist/assets/allowance-module/v0.1.0/allowance-module.json +2 -1
- package/dist/assets/safe-4337-module/v0.2.0/add-modules-lib.json +32 -0
- package/dist/assets/safe-4337-module/v0.2.0/safe-4337-module.json +595 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/safe-4337-module.d.ts +3 -0
- package/dist/safe-4337-module.js +20 -0
- package/dist/types.d.ts +1 -1
- package/dist/utils.d.ts +2 -2
- package/package.json +1 -1
- package/src/allowance-module.ts +3 -3
- package/src/assets/allowance-module/v0.1.0/allowance-module.json +2 -1
- package/src/assets/safe-4337-module/v0.2.0/add-modules-lib.json +32 -0
- package/src/assets/safe-4337-module/v0.2.0/safe-4337-module.json +595 -0
- package/src/index.ts +1 -0
- package/src/safe-4337-module.ts +16 -0
- package/src/types.ts +1 -1
- package/src/utils.ts +2 -5
package/dist/index.js
CHANGED
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./allowance-module"), exports);
|
|
18
|
+
__exportStar(require("./safe-4337-module"), exports);
|
|
18
19
|
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DeploymentFilter, Deployment } from './types';
|
|
2
|
+
export declare const getSafe4337ModuleDeployment: (filter?: DeploymentFilter | undefined) => Deployment | undefined;
|
|
3
|
+
export declare const getAddModulesLibDeployment: (filter?: DeploymentFilter | undefined) => Deployment | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
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"));
|
|
8
|
+
const add_modules_lib_json_1 = __importDefault(require("./assets/safe-4337-module/v0.2.0/add-modules-lib.json"));
|
|
9
|
+
const utils_1 = require("./utils");
|
|
10
|
+
// 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 getSafe4337ModuleDeployment = (filter) => {
|
|
14
|
+
return (0, utils_1.findDeployment)((0, utils_1.applyFilterDefaults)(filter), SAFE_4337_MODULE_DEPLOYMENTS);
|
|
15
|
+
};
|
|
16
|
+
exports.getSafe4337ModuleDeployment = getSafe4337ModuleDeployment;
|
|
17
|
+
const getAddModulesLibDeployment = (filter) => {
|
|
18
|
+
return (0, utils_1.findDeployment)((0, utils_1.applyFilterDefaults)(filter), ADD_MODULES_LIB_DEPLOYMENTS);
|
|
19
|
+
};
|
|
20
|
+
exports.getAddModulesLibDeployment = getAddModulesLibDeployment;
|
package/dist/types.d.ts
CHANGED
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DeploymentFilter,
|
|
2
|
-
export declare const findDeployment: (criteria: DeploymentFilter, deployments:
|
|
1
|
+
import { DeploymentFilter, Deployment } from './types';
|
|
2
|
+
export declare const findDeployment: (criteria: DeploymentFilter, deployments: Deployment[]) => Deployment | undefined;
|
|
3
3
|
export declare const applyFilterDefaults: (filter?: DeploymentFilter | undefined) => DeploymentFilter;
|
package/package.json
CHANGED
package/src/allowance-module.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import AllowanceModule010 from './assets/allowance-module/v0.1.0/allowance-module.json';
|
|
2
|
-
import { DeploymentFilter,
|
|
2
|
+
import { DeploymentFilter, Deployment } from './types';
|
|
3
3
|
import { applyFilterDefaults, findDeployment } from './utils';
|
|
4
4
|
|
|
5
5
|
// The array should be sorted from the latest version to the oldest.
|
|
6
|
-
const ALLOWANCE_MODULE_DEPLOYMENTS:
|
|
6
|
+
const ALLOWANCE_MODULE_DEPLOYMENTS: Deployment[] = [AllowanceModule010];
|
|
7
7
|
|
|
8
|
-
export const getAllowanceModuleDeployment = (filter?: DeploymentFilter):
|
|
8
|
+
export const getAllowanceModuleDeployment = (filter?: DeploymentFilter): Deployment | undefined => {
|
|
9
9
|
return findDeployment(applyFilterDefaults(filter), ALLOWANCE_MODULE_DEPLOYMENTS);
|
|
10
10
|
};
|
|
@@ -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
|
+
}
|