@openzeppelin/upgrades-core 1.31.2 → 1.32.0-alpha.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/artifacts/@openzeppelin/contracts-v5/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.json +76 -0
- package/artifacts/@openzeppelin/contracts-v5/proxy/beacon/BeaconProxy.sol/BeaconProxy.json +87 -0
- package/artifacts/@openzeppelin/contracts-v5/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.json +151 -0
- package/artifacts/@openzeppelin/contracts-v5/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.json +132 -0
- package/artifacts/@openzeppelin/contracts-v5/proxy/transparent/TransparentUpgradeableProxy.sol/ITransparentUpgradeableProxy.json +74 -0
- package/artifacts/@openzeppelin/contracts-v5/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json +116 -0
- package/artifacts/build-info-v5.json +13993 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/scripts/migratable-manifest.test.json +175 -0
- package/dist/scripts/project-file.test.json +25 -0
- package/dist/solidity-version.json +1 -0
- package/dist/standalone.test.js +9 -8
- package/dist/standalone.test.js.map +1 -1
- package/dist/usage-error.d.ts +3 -0
- package/dist/usage-error.d.ts.map +1 -1
- package/dist/usage-error.js +7 -1
- package/dist/usage-error.js.map +1 -1
- package/dist/utils/make-namespaced.d.ts +3 -4
- package/dist/utils/make-namespaced.d.ts.map +1 -1
- package/dist/utils/make-namespaced.js +85 -42
- package/dist/utils/make-namespaced.js.map +1 -1
- package/dist/utils/make-namespaced.test.js +9 -8
- package/dist/utils/make-namespaced.test.js.map +1 -1
- package/package.json +20 -13
- package/src/index.ts +1 -0
- package/src/solidity-version.json +1 -0
- package/src/standalone.test.ts +41 -7
- package/src/usage-error.ts +9 -0
- package/src/utils/make-namespaced.test.ts +11 -9
- package/src/utils/make-namespaced.test.ts.md +97 -32
- package/src/utils/make-namespaced.test.ts.snap +0 -0
- package/src/utils/make-namespaced.ts +91 -44
- package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export { isTransparentOrUUPSProxy, isBeaconProxy, isTransparentProxy } from './e
|
|
|
19
19
|
export { getImplementationAddressFromBeacon, getImplementationAddressFromProxy } from './impl-address';
|
|
20
20
|
export { isBeacon } from './beacon';
|
|
21
21
|
export { addProxyToManifest } from './add-proxy-to-manifest';
|
|
22
|
-
export { BeaconProxyUnsupportedError, LoadProxyUnsupportedError, PrepareUpgradeUnsupportedError, DeployBeaconProxyUnsupportedError, DeployBeaconProxyImplUnknownError, DeployBeaconProxyKindError, ForceImportUnsupportedError, NoContractImportError, ValidateUpdateRequiresKindError, PrepareUpgradeRequiresKindError, assertNotProxy, } from './usage-error';
|
|
22
|
+
export { BeaconProxyUnsupportedError, LoadProxyUnsupportedError, PrepareUpgradeUnsupportedError, DeployBeaconProxyUnsupportedError, DeployBeaconProxyImplUnknownError, DeployBeaconProxyKindError, ForceImportUnsupportedError, NoContractImportError, ValidateUpdateRequiresKindError, PrepareUpgradeRequiresKindError, InitialOwnerUnsupportedKindError, assertNotProxy, } from './usage-error';
|
|
23
23
|
export { ValidateUpgradeSafetyOptions, validateUpgradeSafety, ProjectReport, ReferenceContractNotFound } from './cli';
|
|
24
24
|
export { getUpgradeInterfaceVersion } from './upgrade-interface-version';
|
|
25
25
|
export { makeNamespacedInput } from './utils/make-namespaced';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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O,EAAE,wBAAwB,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,kCAAkC,EAAE,iCAAiC,EAAE,MAAM,gBAAgB,CAAC;AACvG,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,8BAA8B,EAC9B,iCAAiC,EACjC,iCAAiC,EACjC,0BAA0B,EAC1B,2BAA2B,EAC3B,qBAAqB,EACrB,+BAA+B,EAC/B,+BAA+B,EAC/B,gCAAgC,EAChC,cAAc,GACf,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,OAAO,CAAC;AAEtH,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.isNamespaceSupported = exports.makeNamespacedInput = exports.getUpgradeInterfaceVersion = exports.ReferenceContractNotFound = exports.ProjectReport = exports.validateUpgradeSafety = exports.assertNotProxy = exports.PrepareUpgradeRequiresKindError = exports.ValidateUpdateRequiresKindError = exports.NoContractImportError = exports.ForceImportUnsupportedError = exports.DeployBeaconProxyKindError = exports.DeployBeaconProxyImplUnknownError = exports.DeployBeaconProxyUnsupportedError = exports.PrepareUpgradeUnsupportedError = exports.LoadProxyUnsupportedError = exports.BeaconProxyUnsupportedError = exports.addProxyToManifest = exports.isBeacon = exports.getImplementationAddressFromProxy = exports.getImplementationAddressFromBeacon = exports.isTransparentProxy = exports.isBeaconProxy = exports.isTransparentOrUUPSProxy = exports.UpgradeableContract = exports.detectProxyKind = exports.processProxyKind = exports.setProxyKind = exports.logWarning = exports.getStorageLayoutForAddress = exports.DeploymentNotFound = exports.migrateManifest = exports.Manifest = exports.isEmptySlot = exports.toFallbackEip1967Hash = exports.toEip1967Hash = exports.getImplementationAddress = exports.getBeaconAddress = exports.getAdminAddress = exports.EIP1967ImplementationNotFound = exports.EIP1967BeaconNotFound = exports.fetchOrDeployGetDeployment = exports.fetchOrDeployAdmin = exports.fetchOrDeploy = void 0;
|
|
17
|
+
exports.isNamespaceSupported = exports.makeNamespacedInput = exports.getUpgradeInterfaceVersion = exports.ReferenceContractNotFound = exports.ProjectReport = exports.validateUpgradeSafety = exports.assertNotProxy = exports.InitialOwnerUnsupportedKindError = exports.PrepareUpgradeRequiresKindError = exports.ValidateUpdateRequiresKindError = exports.NoContractImportError = exports.ForceImportUnsupportedError = exports.DeployBeaconProxyKindError = exports.DeployBeaconProxyImplUnknownError = exports.DeployBeaconProxyUnsupportedError = exports.PrepareUpgradeUnsupportedError = exports.LoadProxyUnsupportedError = exports.BeaconProxyUnsupportedError = exports.addProxyToManifest = exports.isBeacon = exports.getImplementationAddressFromProxy = exports.getImplementationAddressFromBeacon = exports.isTransparentProxy = exports.isBeaconProxy = exports.isTransparentOrUUPSProxy = exports.UpgradeableContract = exports.detectProxyKind = exports.processProxyKind = exports.setProxyKind = exports.logWarning = exports.getStorageLayoutForAddress = exports.DeploymentNotFound = exports.migrateManifest = exports.Manifest = exports.isEmptySlot = exports.toFallbackEip1967Hash = exports.toEip1967Hash = exports.getImplementationAddress = exports.getBeaconAddress = exports.getAdminAddress = exports.EIP1967ImplementationNotFound = exports.EIP1967BeaconNotFound = exports.fetchOrDeployGetDeployment = exports.fetchOrDeployAdmin = exports.fetchOrDeploy = void 0;
|
|
18
18
|
__exportStar(require("./validate"), exports);
|
|
19
19
|
var impl_store_1 = require("./impl-store");
|
|
20
20
|
Object.defineProperty(exports, "fetchOrDeploy", { enumerable: true, get: function () { return impl_store_1.fetchOrDeploy; } });
|
|
@@ -74,6 +74,7 @@ Object.defineProperty(exports, "ForceImportUnsupportedError", { enumerable: true
|
|
|
74
74
|
Object.defineProperty(exports, "NoContractImportError", { enumerable: true, get: function () { return usage_error_1.NoContractImportError; } });
|
|
75
75
|
Object.defineProperty(exports, "ValidateUpdateRequiresKindError", { enumerable: true, get: function () { return usage_error_1.ValidateUpdateRequiresKindError; } });
|
|
76
76
|
Object.defineProperty(exports, "PrepareUpgradeRequiresKindError", { enumerable: true, get: function () { return usage_error_1.PrepareUpgradeRequiresKindError; } });
|
|
77
|
+
Object.defineProperty(exports, "InitialOwnerUnsupportedKindError", { enumerable: true, get: function () { return usage_error_1.InitialOwnerUnsupportedKindError; } });
|
|
77
78
|
Object.defineProperty(exports, "assertNotProxy", { enumerable: true, get: function () { return usage_error_1.assertNotProxy; } });
|
|
78
79
|
var cli_1 = require("./cli");
|
|
79
80
|
Object.defineProperty(exports, "validateUpgradeSafety", { enumerable: true, get: function () { return cli_1.validateUpgradeSafety; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAA6F;AAApF,2GAAA,aAAa,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAAE,wHAAA,0BAA0B,OAAA;AACtE,4CAA0B;AAC1B,4CAA0B;AAC1B,uCASoB;AARlB,iHAAA,qBAAqB,OAAA;AACrB,yHAAA,6BAA6B,OAAA;AAC7B,2GAAA,eAAe,OAAA;AACf,4GAAA,gBAAgB,OAAA;AAChB,oHAAA,wBAAwB,OAAA;AACxB,yGAAA,aAAa,OA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@ -0,0 +1,175 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contracts": {
|
|
3
|
+
"Box": {
|
|
4
|
+
"address": "0xb682dEEf4f8e298d86bFc3e21f50c675151FB974",
|
|
5
|
+
"constructorCode": "608060405234801561001057600080fd5b506101a3806100206000396000f3fe",
|
|
6
|
+
"bodyBytecodeHash": "0e331fb885de0fa7c715c4819b6ded2449542cb3cce682718791be28ae0789e8",
|
|
7
|
+
"localBytecodeHash": "08100f44a71d905a66088b4c5d72f12417a580d454357e06dcc5ad12b3fa2cbc",
|
|
8
|
+
"deployedBytecodeHash": "08100f44a71d905a66088b4c5d72f12417a580d454357e06dcc5ad12b3fa2cbc",
|
|
9
|
+
"types": {
|
|
10
|
+
"t_uint256": {
|
|
11
|
+
"id": "t_uint256",
|
|
12
|
+
"kind": "elementary",
|
|
13
|
+
"label": "uint256"
|
|
14
|
+
},
|
|
15
|
+
"t_bool": {
|
|
16
|
+
"id": "t_bool",
|
|
17
|
+
"kind": "elementary",
|
|
18
|
+
"label": "bool"
|
|
19
|
+
},
|
|
20
|
+
"t_mapping<t_bool>": {
|
|
21
|
+
"id": "t_mapping<t_bool>",
|
|
22
|
+
"valueType": "t_bool",
|
|
23
|
+
"label": "mapping(key => bool)",
|
|
24
|
+
"kind": "mapping"
|
|
25
|
+
},
|
|
26
|
+
"t_struct<Box.MyStruct>": {
|
|
27
|
+
"id": "t_struct<Box.MyStruct>",
|
|
28
|
+
"kind": "struct",
|
|
29
|
+
"label": "Box.MyStruct",
|
|
30
|
+
"members": [
|
|
31
|
+
{
|
|
32
|
+
"label": "x",
|
|
33
|
+
"astId": 3,
|
|
34
|
+
"type": "t_bool",
|
|
35
|
+
"src": "124:6:0"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"t_enum<Box.MyEnum>": {
|
|
40
|
+
"id": "t_enum<Box.MyEnum>",
|
|
41
|
+
"kind": "enum",
|
|
42
|
+
"label": "Box.MyEnum",
|
|
43
|
+
"members": [
|
|
44
|
+
"UP",
|
|
45
|
+
"DOWN"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"t_array:dyn<t_uint256>": {
|
|
49
|
+
"id": "t_array:dyn<t_uint256>",
|
|
50
|
+
"valueType": "t_uint256",
|
|
51
|
+
"length": "dyn",
|
|
52
|
+
"kind": "array",
|
|
53
|
+
"label": "uint256[]"
|
|
54
|
+
},
|
|
55
|
+
"t_array:10<t_uint256>": {
|
|
56
|
+
"id": "t_array:10<t_uint256>",
|
|
57
|
+
"valueType": "t_uint256",
|
|
58
|
+
"length": "10",
|
|
59
|
+
"kind": "array",
|
|
60
|
+
"label": "uint256[10]"
|
|
61
|
+
},
|
|
62
|
+
"t_array:dyn<t_enum<Box.MyEnum>>": {
|
|
63
|
+
"id": "t_array:dyn<t_enum<Box.MyEnum>>",
|
|
64
|
+
"valueType": "t_enum<Box.MyEnum>",
|
|
65
|
+
"length": "dyn",
|
|
66
|
+
"kind": "array",
|
|
67
|
+
"label": "Box.MyEnum[]"
|
|
68
|
+
},
|
|
69
|
+
"t_bytes8": {
|
|
70
|
+
"id": "t_bytes8",
|
|
71
|
+
"kind": "elementary",
|
|
72
|
+
"label": "bytes8"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"storage": [
|
|
76
|
+
{
|
|
77
|
+
"contract": "Box",
|
|
78
|
+
"path": "contracts/Box.sol",
|
|
79
|
+
"label": "value",
|
|
80
|
+
"astId": 9,
|
|
81
|
+
"type": "t_uint256",
|
|
82
|
+
"src": "173:21:0"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"contract": "Box",
|
|
86
|
+
"path": "contracts/Box.sol",
|
|
87
|
+
"label": "flag",
|
|
88
|
+
"astId": 11,
|
|
89
|
+
"type": "t_bool",
|
|
90
|
+
"src": "200:17:0"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"contract": "Box",
|
|
94
|
+
"path": "contracts/Box.sol",
|
|
95
|
+
"label": "map",
|
|
96
|
+
"astId": 15,
|
|
97
|
+
"type": "t_mapping<t_bool>",
|
|
98
|
+
"src": "223:26:0"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"contract": "Box",
|
|
102
|
+
"path": "contracts/Box.sol",
|
|
103
|
+
"label": "foo",
|
|
104
|
+
"astId": 17,
|
|
105
|
+
"type": "t_struct<Box.MyStruct>",
|
|
106
|
+
"src": "255:20:0"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"contract": "Box",
|
|
110
|
+
"path": "contracts/Box.sol",
|
|
111
|
+
"label": "myEnum",
|
|
112
|
+
"astId": 19,
|
|
113
|
+
"type": "t_enum<Box.MyEnum>",
|
|
114
|
+
"src": "281:21:0"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"contract": "Box",
|
|
118
|
+
"path": "contracts/Box.sol",
|
|
119
|
+
"label": "dynArray",
|
|
120
|
+
"astId": 22,
|
|
121
|
+
"type": "t_array:dyn<t_uint256>",
|
|
122
|
+
"src": "308:23:0"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"contract": "Box",
|
|
126
|
+
"path": "contracts/Box.sol",
|
|
127
|
+
"label": "staticArray",
|
|
128
|
+
"astId": 26,
|
|
129
|
+
"type": "t_array:10<t_uint256>",
|
|
130
|
+
"src": "337:20:0"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"contract": "Box",
|
|
134
|
+
"path": "contracts/Box.sol",
|
|
135
|
+
"label": "enumArray",
|
|
136
|
+
"astId": 29,
|
|
137
|
+
"type": "t_array:dyn<t_enum<Box.MyEnum>>",
|
|
138
|
+
"src": "363:26:0"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"contract": "Box",
|
|
142
|
+
"path": "contracts/Box.sol",
|
|
143
|
+
"label": "byteArray",
|
|
144
|
+
"astId": 31,
|
|
145
|
+
"type": "t_bytes8",
|
|
146
|
+
"src": "395:16:0"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"warnings": {
|
|
150
|
+
"hasConstructor": false,
|
|
151
|
+
"hasSelfDestruct": false,
|
|
152
|
+
"hasDelegateCall": false,
|
|
153
|
+
"hasInitialValuesInDeclarations": false,
|
|
154
|
+
"uninitializedBaseContracts": []
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"solidityLibs": {},
|
|
159
|
+
"proxies": {
|
|
160
|
+
"my-project/Box": [
|
|
161
|
+
{
|
|
162
|
+
"address": "0xE4C10Db67595aF2Cb4166c8C274e0140f7E43059",
|
|
163
|
+
"version": "1.0.0",
|
|
164
|
+
"implementation": "0xb682dEEf4f8e298d86bFc3e21f50c675151FB974",
|
|
165
|
+
"admin": "0x1750499D05Ed1674d822430FB960d5F6731fDf64",
|
|
166
|
+
"kind": "Upgradeable"
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
"manifestVersion": "2.2",
|
|
171
|
+
"version": "1.0.0",
|
|
172
|
+
"proxyAdmin": {
|
|
173
|
+
"address": "0x1750499D05Ed1674d822430FB960d5F6731fDf64"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifestVersion": "2.2",
|
|
3
|
+
"contracts": {
|
|
4
|
+
"Box": "Box"
|
|
5
|
+
},
|
|
6
|
+
"dependencies": {},
|
|
7
|
+
"name": "my-project",
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"compiler": {
|
|
10
|
+
"compilerSettings": {
|
|
11
|
+
"optimizer": {
|
|
12
|
+
"enabled": false,
|
|
13
|
+
"runs": "200"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"typechain": {
|
|
17
|
+
"enabled": false
|
|
18
|
+
},
|
|
19
|
+
"manager": "openzeppelin",
|
|
20
|
+
"solcVersion": "0.6.12",
|
|
21
|
+
"artifactsDir": "build/contracts",
|
|
22
|
+
"contractsDir": "contracts"
|
|
23
|
+
},
|
|
24
|
+
"telemetryOptIn": false
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"0.8.20"
|
package/dist/standalone.test.js
CHANGED
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const ava_1 = __importDefault(require("ava"));
|
|
7
7
|
const hardhat_1 = require("hardhat");
|
|
8
|
+
const solidity_version_json_1 = __importDefault(require("./solidity-version.json"));
|
|
8
9
|
const standalone_1 = require("./standalone");
|
|
9
10
|
const test = ava_1.default;
|
|
10
11
|
test.before(async (t) => {
|
|
@@ -16,32 +17,32 @@ test.before(async (t) => {
|
|
|
16
17
|
t.context.solcOutput = buildInfo.output;
|
|
17
18
|
});
|
|
18
19
|
test('reports unsafe operation', t => {
|
|
19
|
-
const impl = new standalone_1.UpgradeableContract('StandaloneV1', t.context.solcInput, t.context.solcOutput);
|
|
20
|
+
const impl = new standalone_1.UpgradeableContract('StandaloneV1', t.context.solcInput, t.context.solcOutput, {}, solidity_version_json_1.default);
|
|
20
21
|
const report = impl.getErrorReport();
|
|
21
22
|
t.false(report.ok);
|
|
22
23
|
t.true(report.errors[0].kind === 'delegatecall');
|
|
23
24
|
});
|
|
24
25
|
test('reports unsafe operation - fully qualified name', t => {
|
|
25
|
-
const impl = new standalone_1.UpgradeableContract('contracts/test/Standalone.sol:StandaloneV1', t.context.solcInput, t.context.solcOutput);
|
|
26
|
+
const impl = new standalone_1.UpgradeableContract('contracts/test/Standalone.sol:StandaloneV1', t.context.solcInput, t.context.solcOutput, {}, solidity_version_json_1.default);
|
|
26
27
|
const report = impl.getErrorReport();
|
|
27
28
|
t.false(report.ok);
|
|
28
29
|
t.true(report.errors[0].kind === 'delegatecall');
|
|
29
30
|
});
|
|
30
31
|
test('reports storage upgrade errors', t => {
|
|
31
|
-
const v1 = new standalone_1.UpgradeableContract('StandaloneV1', t.context.solcInput, t.context.solcOutput);
|
|
32
|
-
const v2Good = new standalone_1.UpgradeableContract('StandaloneV2Good', t.context.solcInput, t.context.solcOutput);
|
|
32
|
+
const v1 = new standalone_1.UpgradeableContract('StandaloneV1', t.context.solcInput, t.context.solcOutput, {}, solidity_version_json_1.default);
|
|
33
|
+
const v2Good = new standalone_1.UpgradeableContract('StandaloneV2Good', t.context.solcInput, t.context.solcOutput, {}, solidity_version_json_1.default);
|
|
33
34
|
const goodReport = v1.getStorageUpgradeReport(v2Good);
|
|
34
35
|
t.true(goodReport.ok);
|
|
35
|
-
const v2Bad = new standalone_1.UpgradeableContract('StandaloneV2Bad', t.context.solcInput, t.context.solcOutput);
|
|
36
|
+
const v2Bad = new standalone_1.UpgradeableContract('StandaloneV2Bad', t.context.solcInput, t.context.solcOutput, {}, solidity_version_json_1.default);
|
|
36
37
|
const badReport = v1.getStorageUpgradeReport(v2Bad);
|
|
37
38
|
t.false(badReport.ok);
|
|
38
39
|
});
|
|
39
40
|
test('dont report renamed version update', t => {
|
|
40
|
-
const v1 = new standalone_1.UpgradeableContract('StandaloneRenameV1', t.context.solcInput, t.context.solcOutput);
|
|
41
|
-
const v2 = new standalone_1.UpgradeableContract('StandaloneRenameV2', t.context.solcInput, t.context.solcOutput);
|
|
41
|
+
const v1 = new standalone_1.UpgradeableContract('StandaloneRenameV1', t.context.solcInput, t.context.solcOutput, {}, solidity_version_json_1.default);
|
|
42
|
+
const v2 = new standalone_1.UpgradeableContract('StandaloneRenameV2', t.context.solcInput, t.context.solcOutput, {}, solidity_version_json_1.default);
|
|
42
43
|
const goodReport = v1.getStorageUpgradeReport(v2);
|
|
43
44
|
t.true(goodReport.ok);
|
|
44
|
-
const v3 = new standalone_1.UpgradeableContract('StandaloneRenameV3', t.context.solcInput, t.context.solcOutput);
|
|
45
|
+
const v3 = new standalone_1.UpgradeableContract('StandaloneRenameV3', t.context.solcInput, t.context.solcOutput, {}, solidity_version_json_1.default);
|
|
45
46
|
const goodReport2 = v2.getStorageUpgradeReport(v3);
|
|
46
47
|
t.true(goodReport2.ok);
|
|
47
48
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standalone.test.js","sourceRoot":"","sources":["../src/standalone.test.ts"],"names":[],"mappings":";;;;;AAAA,8CAAoC;AACpC,qCAAoC;
|
|
1
|
+
{"version":3,"file":"standalone.test.js","sourceRoot":"","sources":["../src/standalone.test.ts"],"names":[],"mappings":";;;;;AAAA,8CAAoC;AACpC,qCAAoC;AAEpC,oFAAuD;AAGvD,6CAAmD;AAOnD,MAAM,IAAI,GAAG,aAAwB,CAAC;AAEtC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAC,CAAC,EAAC,EAAE;IACpB,MAAM,SAAS,GAAG,MAAM,mBAAS,CAAC,YAAY,CAAC,4CAA4C,CAAC,CAAC;IAC7F,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;KACzC;IACD,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC;IACtC,CAAC,CAAC,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,MAAM,CAAC;AAC1C,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,0BAA0B,EAAE,CAAC,CAAC,EAAE;IACnC,MAAM,IAAI,GAAG,IAAI,gCAAmB,CAAC,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,EAAE,+BAAgB,CAAC,CAAC;IACtH,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACrC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACnB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC;AACnD,CAAC,CAAC,CAAC;AAEH,IAAI,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,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACrC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,mCAAmC,EAAE,KAAK,EAAC,CAAC,EAAC,EAAE;IAClD,MAAM,SAAS,GAAG,MAAM,mBAAS,CAAC,YAAY,CAAC,uCAAuC,CAAC,CAAC;IACxF,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;KACzC;IAED,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,gCAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACpG,CAAC,CAAC,MAAM,CACN,KAAK,EAAE,OAAO,CAAC,QAAQ,CACrB,oIAAoI,CACrI,EACD,KAAK,EAAE,OAAO,CACf,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/dist/usage-error.d.ts
CHANGED
|
@@ -35,5 +35,8 @@ export declare class ValidateUpdateRequiresKindError extends UpgradesError {
|
|
|
35
35
|
export declare class PrepareUpgradeRequiresKindError extends UpgradesError {
|
|
36
36
|
constructor();
|
|
37
37
|
}
|
|
38
|
+
export declare class InitialOwnerUnsupportedKindError extends UpgradesError {
|
|
39
|
+
constructor(kind: string);
|
|
40
|
+
}
|
|
38
41
|
export declare function assertNotProxy(provider: EthereumProvider, address: string): Promise<void>;
|
|
39
42
|
//# sourceMappingURL=usage-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage-error.d.ts","sourceRoot":"","sources":["../src/usage-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA6D,aAAa,EAAE,MAAM,GAAG,CAAC;AAE/G,qBAAa,2BAA4B,SAAQ,aAAa;;CAO7D;AAED,qBAAa,0BAA2B,SA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oB,EAAE,MAAM;CAMzC;AAED,qBAAa,qBAAsB,SAAQ,aAAa;gBAC1C,OAAO,EAAE,MAAM;CAM5B;AAED,qBAAa,+BAAgC,SAAQ,aAAa;;CAQjE;AAED,qBAAa,+BAAgC,SAAQ,aAAa;;CAQjE;AAED,qBAAa,gCAAiC,SAAQ,aAAa;gBACrD,IAAI,EAAE,MAAM;CAMzB;AAED,wBAAsB,cAAc,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,iBAc/E"}
|
package/dist/usage-error.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertNotProxy = exports.PrepareUpgradeRequiresKindError = exports.ValidateUpdateRequiresKindError = exports.NoContractImportError = exports.ForceImportUnsupportedError = exports.PrepareUpgradeUnsupportedError = exports.LoadProxyUnsupportedError = exports.DeployBeaconProxyImplUnknownError = exports.DeployBeaconProxyUnsupportedError = exports.DeployBeaconProxyKindError = exports.BeaconProxyUnsupportedError = void 0;
|
|
3
|
+
exports.assertNotProxy = exports.InitialOwnerUnsupportedKindError = exports.PrepareUpgradeRequiresKindError = exports.ValidateUpdateRequiresKindError = exports.NoContractImportError = exports.ForceImportUnsupportedError = exports.PrepareUpgradeUnsupportedError = exports.LoadProxyUnsupportedError = exports.DeployBeaconProxyImplUnknownError = exports.DeployBeaconProxyUnsupportedError = exports.DeployBeaconProxyKindError = exports.BeaconProxyUnsupportedError = void 0;
|
|
4
4
|
const _1 = require(".");
|
|
5
5
|
class BeaconProxyUnsupportedError extends _1.UpgradesError {
|
|
6
6
|
constructor() {
|
|
@@ -68,6 +68,12 @@ class PrepareUpgradeRequiresKindError extends _1.UpgradesError {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
exports.PrepareUpgradeRequiresKindError = PrepareUpgradeRequiresKindError;
|
|
71
|
+
class InitialOwnerUnsupportedKindError extends _1.UpgradesError {
|
|
72
|
+
constructor(kind) {
|
|
73
|
+
super(`The \`initialOwner\` option is not supported for this kind of proxy ('${kind}')`, () => `Set the initial owner as part of your contract's initializer arguments instead.`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.InitialOwnerUnsupportedKindError = InitialOwnerUnsupportedKindError;
|
|
71
77
|
async function assertNotProxy(provider, address) {
|
|
72
78
|
if (await (0, _1.isTransparentOrUUPSProxy)(provider, address)) {
|
|
73
79
|
throw new _1.UpgradesError('Address is a transparent or UUPS proxy which cannot be upgraded using upgradeBeacon().', () => 'Use upgradeProxy() instead.');
|
package/dist/usage-error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage-error.js","sourceRoot":"","sources":["../src/usage-error.ts"],"names":[],"mappings":";;;AAAA,wBAA+G;AAE/G,MAAa,2BAA4B,SAAQ,gBAAa;IAC5D;QACE,KAAK,CACH,6DAA6D,EAC7D,GAAG,EAAE,CAAC,sEAAsE,CAC7E,CAAC;IACJ,CAAC;CACF;AAPD,kEAOC;AAED,MAAa,0BAA2B,SAAQ,gBAAa;IAC3D,YAAY,IAAY;QACtB,KAAK,CACH,2BAA2B,IAAI,GAAG,EAClC,GAAG,EAAE,CAAC,6EAA6E,CACpF,CAAC;IACJ,CAAC;CACF;AAPD,gEAOC;AAED,MAAa,iCAAkC,SAAQ,gBAAa;IAClE,YAAY,aAAqB;QAC/B,KAAK,CAAC,eAAe,aAAa,6BAA6B,EAAE,GAAG,EAAE,CAAC,uCAAuC,CAAC,CAAC;IAClH,CAAC;CACF;AAJD,8EAIC;AAED,MAAa,iCAAkC,SAAQ,gBAAa;IAClE,YAAY,WAAmB;QAC7B,KAAK,CACH,sCAAsC,WAAW,aAAa,EAC9D,GAAG,EAAE,CAAC,wGAAwG,CAC/G,CAAC;IACJ,CAAC;CACF;AAPD,8EAOC;AAED,MAAa,yBAA0B,SAAQ,gBAAa;IAC1D,YAAY,YAAoB;QAC9B,KAAK,C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H,gIAAgI,aAAa,WAAW,CAC3J,CAAC;KACH;AACH,CAAC;AAdD,wCAcC"}
|
|
@@ -5,10 +5,9 @@ import { SolcInput, SolcOutput } from '../solc-api';
|
|
|
5
5
|
*
|
|
6
6
|
* This makes the following modifications to the input:
|
|
7
7
|
* - Adds a state variable for each namespaced struct definition
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
11
|
-
* - Converts all free functions and constants (at file level) to dummy variables (do not delete them since they might be imported by other files)
|
|
8
|
+
* - For each contract, for all node types that are not needed for storage layout or may reference deleted functions and constructors, converts them to dummy enums with random id
|
|
9
|
+
* - Converts all using for directives (at file level and in contracts) to dummy enums with random id (do not delete them to avoid orphaning possible NatSpec documentation)
|
|
10
|
+
* - Converts all custom errors, free functions and constants (at file level) to dummy enums with the same name (do not delete them since they might be imported by other files)
|
|
12
11
|
*
|
|
13
12
|
* Also sets the outputSelection to only include storageLayout and ast, since the other outputs are not needed.
|
|
14
13
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-namespaced.d.ts","sourceRoot":"","sources":["../../src/utils/make-namespaced.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAWpD
|
|
1
|
+
{"version":3,"file":"make-namespaced.d.ts","sourceRoot":"","sources":["../../src/utils/make-namespaced.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAWpD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,SAAS,CA6GnF"}
|
|
@@ -16,10 +16,9 @@ const OUTPUT_SELECTION = {
|
|
|
16
16
|
*
|
|
17
17
|
* This makes the following modifications to the input:
|
|
18
18
|
* - Adds a state variable for each namespaced struct definition
|
|
19
|
-
* -
|
|
20
|
-
* -
|
|
21
|
-
* -
|
|
22
|
-
* - Converts all free functions and constants (at file level) to dummy variables (do not delete them since they might be imported by other files)
|
|
19
|
+
* - For each contract, for all node types that are not needed for storage layout or may reference deleted functions and constructors, converts them to dummy enums with random id
|
|
20
|
+
* - Converts all using for directives (at file level and in contracts) to dummy enums with random id (do not delete them to avoid orphaning possible NatSpec documentation)
|
|
21
|
+
* - Converts all custom errors, free functions and constants (at file level) to dummy enums with the same name (do not delete them since they might be imported by other files)
|
|
23
22
|
*
|
|
24
23
|
* Also sets the outputSelection to only include storageLayout and ast, since the other outputs are not needed.
|
|
25
24
|
*
|
|
@@ -36,53 +35,91 @@ function makeNamespacedInput(input, output) {
|
|
|
36
35
|
continue;
|
|
37
36
|
}
|
|
38
37
|
const orig = Buffer.from(source.content, 'utf8');
|
|
38
|
+
const replacedIdentifiers = new Set();
|
|
39
39
|
const modifications = [];
|
|
40
40
|
for (const node of output.sources[sourcePath].ast.nodes) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
(
|
|
48
|
-
|
|
41
|
+
switch (node.nodeType) {
|
|
42
|
+
case 'ContractDefinition': {
|
|
43
|
+
const contractDef = node;
|
|
44
|
+
// Remove any calls to parent constructors from the inheritance list
|
|
45
|
+
const inherits = contractDef.baseContracts;
|
|
46
|
+
for (const inherit of inherits) {
|
|
47
|
+
if (Array.isArray(inherit.arguments)) {
|
|
48
|
+
(0, assert_1.assert)(inherit.baseName.name !== undefined);
|
|
49
|
+
modifications.push(makeReplace(inherit, orig, inherit.baseName.name));
|
|
50
|
+
}
|
|
49
51
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
const contractNodes = contractDef.nodes;
|
|
53
|
+
for (const contractNode of contractNodes) {
|
|
54
|
+
switch (contractNode.nodeType) {
|
|
55
|
+
case 'ErrorDefinition':
|
|
56
|
+
case 'EventDefinition':
|
|
57
|
+
case 'FunctionDefinition':
|
|
58
|
+
case 'ModifierDefinition':
|
|
59
|
+
case 'UsingForDirective':
|
|
60
|
+
case 'VariableDeclaration': {
|
|
61
|
+
// Replace with an enum based on astId (the original name is not needed, since nothing should reference it)
|
|
62
|
+
modifications.push(makeReplace(contractNode, orig, toDummyEnumWithAstId(contractNode.id)));
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
case 'StructDefinition': {
|
|
66
|
+
const storageLocation = (0, namespace_1.getStorageLocationAnnotation)(contractNode);
|
|
67
|
+
if (storageLocation !== undefined) {
|
|
68
|
+
const structName = contractNode.name;
|
|
69
|
+
const variableName = `$${structName}_${(Math.random() * 1e6).toFixed(0)}`;
|
|
70
|
+
const insertText = ` ${structName} ${variableName};`;
|
|
71
|
+
modifications.push(makeInsertAfter(contractNode, insertText));
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
case 'EnumDefinition':
|
|
76
|
+
case 'UserDefinedValueTypeDefinition':
|
|
77
|
+
default: {
|
|
78
|
+
// - EnumDefinition may be used in structures with storage locations
|
|
79
|
+
// - UserDefinedValueTypeDefinition may be used in structures with storage locations
|
|
80
|
+
// - default: in case unexpected ast nodes show up
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
58
83
|
}
|
|
59
|
-
modifications.push(makeDelete(contractNode, orig));
|
|
60
84
|
}
|
|
61
|
-
|
|
62
|
-
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
// - UsingForDirective isn't needed, but it might have NatSpec documentation which is not included in the AST.
|
|
88
|
+
// We convert it to a dummy enum to avoid orphaning any possible documentation.
|
|
89
|
+
// - ErrorDefinition, FunctionDefinition, and VariableDeclaration might be imported by other files, so they cannot be deleted.
|
|
90
|
+
// However, we need to remove their values to avoid referencing other deleted nodes.
|
|
91
|
+
// We do this by converting them to dummy enums, but avoiding duplicate names.
|
|
92
|
+
case 'UsingForDirective':
|
|
93
|
+
case 'ErrorDefinition':
|
|
94
|
+
case 'FunctionDefinition':
|
|
95
|
+
case 'VariableDeclaration': {
|
|
96
|
+
// If an identifier with the same name was not previously written, replace with a dummy enum using its name.
|
|
97
|
+
// Otherwise replace with an enum based on astId to avoid duplicate names, which can happen if there was overloading.
|
|
98
|
+
// This does not need to check all identifiers from the original contract, since the original compilation
|
|
99
|
+
// should have failed if there were conflicts in the first place.
|
|
100
|
+
if ('name' in node && !replacedIdentifiers.has(node.name)) {
|
|
101
|
+
modifications.push(makeReplace(node, orig, toDummyEnumWithName(node.name)));
|
|
102
|
+
replacedIdentifiers.add(node.name);
|
|
63
103
|
}
|
|
64
|
-
else
|
|
65
|
-
|
|
66
|
-
if (storageLocation !== undefined) {
|
|
67
|
-
const structName = contractNode.name;
|
|
68
|
-
const variableName = `$${structName}_${(Math.random() * 1e6).toFixed(0)}`;
|
|
69
|
-
const insertText = ` ${structName} ${variableName};`;
|
|
70
|
-
modifications.push(makeInsertAfter(contractNode, insertText));
|
|
71
|
-
}
|
|
104
|
+
else {
|
|
105
|
+
modifications.push(makeReplace(node, orig, toDummyEnumWithAstId(node.id)));
|
|
72
106
|
}
|
|
107
|
+
break;
|
|
73
108
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
109
|
+
case 'EnumDefinition':
|
|
110
|
+
case 'ImportDirective':
|
|
111
|
+
case 'PragmaDirective':
|
|
112
|
+
case 'StructDefinition':
|
|
113
|
+
case 'UserDefinedValueTypeDefinition':
|
|
114
|
+
default: {
|
|
115
|
+
// - EnumDefinition may be used in structures with storage locations
|
|
116
|
+
// - ImportDirective may import types used in structures with storage locations
|
|
117
|
+
// - PragmaDirective is necessary for compilation
|
|
118
|
+
// - StructDefinition may be used in structures with storage locations
|
|
119
|
+
// - UserDefinedValueTypeDefinition may be used in structures with storage locations
|
|
120
|
+
// - default: in case unexpected ast nodes show up (file-level events since 0.8.22)
|
|
121
|
+
break;
|
|
78
122
|
}
|
|
79
|
-
// Replace with a dummy variable of arbitrary type
|
|
80
|
-
const name = node.name;
|
|
81
|
-
const insertText = `uint256 constant ${name} = 0;`;
|
|
82
|
-
modifications.push(makeReplace(node, orig, insertText));
|
|
83
|
-
}
|
|
84
|
-
else if ((0, utils_1.isNodeType)('UsingForDirective', node)) {
|
|
85
|
-
modifications.push(makeDelete(node, orig));
|
|
86
123
|
}
|
|
87
124
|
}
|
|
88
125
|
modifiedSources[sourcePath] = { ...source, content: getModifiedSource(orig, modifications) };
|
|
@@ -90,6 +127,12 @@ function makeNamespacedInput(input, output) {
|
|
|
90
127
|
return { ...input, sources: modifiedSources, settings: { ...input.settings, outputSelection: OUTPUT_SELECTION } };
|
|
91
128
|
}
|
|
92
129
|
exports.makeNamespacedInput = makeNamespacedInput;
|
|
130
|
+
function toDummyEnumWithName(name) {
|
|
131
|
+
return `enum ${name} { dummy }`;
|
|
132
|
+
}
|
|
133
|
+
function toDummyEnumWithAstId(astId) {
|
|
134
|
+
return `enum $astId_${astId}_${(Math.random() * 1e6).toFixed(0)} { dummy }`;
|
|
135
|
+
}
|
|
93
136
|
function getPositions(node) {
|
|
94
137
|
const [start, length] = node.src.split(':').map(Number);
|
|
95
138
|
const end = start + length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-namespaced.js","sourceRoot":"","sources":["../../src/utils/make-namespaced.ts"],"names":[],"mappings":";;;AAAA,8CAAgD;AAGhD,oDAAoE;AACpE,qCAAkC;AAElC,MAAM,gBAAgB,GAAG;IACvB,GAAG,EAAE;QACH,GAAG,EAAE,CAAC,eAAe,CAAC;QACtB,EAAE,EAAE,CAAC,KAAK,CAAC;KACZ;CACF,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"make-namespaced.js","sourceRoot":"","sources":["../../src/utils/make-namespaced.ts"],"names":[],"mappings":";;;AAAA,8CAAgD;AAGhD,oDAAoE;AACpE,qCAAkC;AAElC,MAAM,gBAAgB,GAAG;IACvB,GAAG,EAAE;QACH,GA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