@openzeppelin/upgrades-core 1.32.2 → 1.32.3
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/dist/cli/validate/build-info-file.d.ts.map +1 -1
- package/dist/cli/validate/build-info-file.js +19 -5
- package/dist/cli/validate/build-info-file.js.map +1 -1
- package/dist/cli/validate/build-info-file.test.js +231 -6
- package/dist/cli/validate/build-info-file.test.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/validate/build-info-file.test.ts +253 -6
- package/src/cli/validate/build-info-file.ts +25 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-info-file.d.ts","sourceRoot":"","sources":["../../../src/cli/validate/build-info-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"build-info-file.d.ts","sourceRoot":"","sources":["../../../src/cli/validate/build-info-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiC9C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,YAAY,CAAC,EAAE,MAAM,4BAI5D"}
|
|
@@ -29,6 +29,10 @@ If using Foundry, include the "storageLayout" extra output in foundry.toml:
|
|
|
29
29
|
build_info = true
|
|
30
30
|
extra_output = ["storageLayout"]
|
|
31
31
|
Then recompile your contracts with '${FOUNDRY_COMPILE_COMMAND}' and try again.`;
|
|
32
|
+
const PARTIAL_COMPILE_HELP = `\
|
|
33
|
+
Recompile all contracts with one of the following commands and try again:
|
|
34
|
+
If using Hardhat: ${HARDHAT_COMPILE_COMMAND}
|
|
35
|
+
If using Foundry: ${FOUNDRY_COMPILE_COMMAND}`;
|
|
32
36
|
/**
|
|
33
37
|
* Gets the build info files from the build info directory.
|
|
34
38
|
*
|
|
@@ -97,9 +101,7 @@ async function readBuildInfo(buildInfoFilePaths) {
|
|
|
97
101
|
throw new error_1.ValidateCommandError(`Build info file ${buildInfoFilePath} must contain Solidity compiler input, output, and solcVersion.`);
|
|
98
102
|
}
|
|
99
103
|
else {
|
|
100
|
-
|
|
101
|
-
throw new error_1.ValidateCommandError(`Build info file ${buildInfoFilePath} does not contain storage layout.`, () => STORAGE_LAYOUT_HELP);
|
|
102
|
-
}
|
|
104
|
+
checkOutputSelection(buildInfoJson, buildInfoFilePath);
|
|
103
105
|
buildInfoFiles.push({
|
|
104
106
|
input: buildInfoJson.input,
|
|
105
107
|
output: buildInfoJson.output,
|
|
@@ -109,9 +111,21 @@ async function readBuildInfo(buildInfoFilePaths) {
|
|
|
109
111
|
}
|
|
110
112
|
return buildInfoFiles;
|
|
111
113
|
}
|
|
112
|
-
|
|
114
|
+
/**
|
|
115
|
+
* Gives an error if there is empty output selection for any contract, or a contract does not have storage layout.
|
|
116
|
+
*/
|
|
117
|
+
function checkOutputSelection(buildInfoJson, buildInfoFilePath) {
|
|
113
118
|
const o = buildInfoJson.input.settings?.outputSelection;
|
|
114
|
-
return
|
|
119
|
+
return Object.keys(o).forEach((item) => {
|
|
120
|
+
if ((o[item][''] === undefined || o[item][''].length === 0) && o[item]['*'].length === 0) {
|
|
121
|
+
// No outputs at all for this contract e.g. if there were no changes since the last compile in Foundry.
|
|
122
|
+
// This is not supported for now, since it leads to AST nodes that reference node ids in other build-info files.
|
|
123
|
+
throw new error_1.ValidateCommandError(`Build info file ${buildInfoFilePath} is not from a full compilation.`, () => PARTIAL_COMPILE_HELP);
|
|
124
|
+
}
|
|
125
|
+
else if (!o[item]['*'].includes('storageLayout')) {
|
|
126
|
+
throw new error_1.ValidateCommandError(`Build info file ${buildInfoFilePath} does not contain storage layout for all contracts.`, () => STORAGE_LAYOUT_HELP);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
115
129
|
}
|
|
116
130
|
async function readJSON(path) {
|
|
117
131
|
return JSON.parse(await fs_1.promises.readFile(path, 'utf8'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-info-file.js","sourceRoot":"","sources":["../../../src/cli/validate/build-info-file.ts"],"names":[],"mappings":";;;;;;AAEA,2BAAoC;AACpC,gDAAwB;AACxB,mCAA+C;AAE/C,MAAM,uBAAuB,GAAG,0CAA0C,CAAC;AAC3E,MAAM,uBAAuB,GAAG,4BAA4B,CAAC;AAC7D,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;sCAaU,uBAAuB;;;;;;sCAMvB,uBAAuB,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"build-info-file.js","sourceRoot":"","sources":["../../../src/cli/validate/build-info-file.ts"],"names":[],"mappings":";;;;;;AAEA,2BAAoC;AACpC,gDAAwB;AACxB,mCAA+C;AAE/C,MAAM,uBAAuB,GAAG,0CAA0C,CAAC;AAC3E,MAAM,uBAAuB,GAAG,4BAA4B,CAAC;AAC7D,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;sCAaU,uBAAuB;;;;;;sCAMvB,uBAAuB,kBAAkB,CAAC;AAChF,MAAM,oBAAoB,GAAG;;oBAET,uBAAuB;oBACvB,uBAAuB,EAAE,CAAC;AAsB9C;;;;;GAKG;AACI,KAAK,UAAU,iBAAiB,CAAC,YAAqB;IAC3D,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO,MAAM,aAAa,CAAC,SAAS,CAAC,CAAC;AACxC,CAAC;AAJD,8CAIC;AAED,KAAK,UAAU,OAAO,CAAC,YAAgC;IACrD,IAAI,YAAY,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,YAAY,CAAC,YAAY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O_LAYOUT = {
|
|
97
|
+
solcVersion: '0.8.9',
|
|
98
|
+
input: {
|
|
99
|
+
language: 'Solidity',
|
|
100
|
+
sources: {
|
|
101
|
+
'mypath/MyContract.sol': {
|
|
102
|
+
content: 'contract MyContract {}',
|
|
103
|
+
},
|
|
104
|
+
'mypath/MyContractV2.sol': {
|
|
105
|
+
content: 'contract MyContractV2 {}',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
settings: {
|
|
109
|
+
outputSelection: {
|
|
110
|
+
'mypath/MyContract.sol': {
|
|
111
|
+
'': ['ast'],
|
|
112
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata'],
|
|
113
|
+
},
|
|
114
|
+
'mypath/MyContractV2.sol': {
|
|
115
|
+
'': ['ast'],
|
|
116
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata'],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
output: {
|
|
122
|
+
sources: {
|
|
123
|
+
'mypath/MyContract.sol': {
|
|
124
|
+
ast: {},
|
|
125
|
+
id: 123,
|
|
126
|
+
},
|
|
127
|
+
'mypath/MyContractV2.sol': {
|
|
128
|
+
ast: {},
|
|
129
|
+
id: 456,
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
const BUILD_INFO_INDIVIDUAL_HAS_LAYOUT = {
|
|
135
|
+
solcVersion: '0.8.9',
|
|
136
|
+
input: {
|
|
137
|
+
language: 'Solidity',
|
|
138
|
+
sources: {
|
|
139
|
+
'mypath/MyContract.sol': {
|
|
140
|
+
content: 'contract MyContract {}',
|
|
141
|
+
},
|
|
142
|
+
'mypath/MyContractV2.sol': {
|
|
143
|
+
content: 'contract MyContractV2 {}',
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
settings: {
|
|
147
|
+
outputSelection: {
|
|
148
|
+
'mypath/MyContract.sol': {
|
|
149
|
+
'': ['ast'],
|
|
150
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata', 'storageLayout'],
|
|
151
|
+
},
|
|
152
|
+
'mypath/MyContractV2.sol': {
|
|
153
|
+
'': ['ast'],
|
|
154
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata', 'storageLayout'],
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
output: {
|
|
160
|
+
sources: {
|
|
161
|
+
'mypath/MyContract.sol': {
|
|
162
|
+
ast: {},
|
|
163
|
+
id: 123,
|
|
164
|
+
},
|
|
165
|
+
'mypath/MyContractV2.sol': {
|
|
166
|
+
ast: {},
|
|
167
|
+
id: 456,
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
const BUILD_INFO_PARTIAL_LAYOUT = {
|
|
173
|
+
solcVersion: '0.8.9',
|
|
174
|
+
input: {
|
|
175
|
+
language: 'Solidity',
|
|
176
|
+
sources: {
|
|
177
|
+
'mypath/MyContract.sol': {
|
|
178
|
+
content: 'contract MyContract {}',
|
|
179
|
+
},
|
|
180
|
+
'mypath/MyContractV2.sol': {
|
|
181
|
+
content: 'contract MyContractV2 {}',
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
settings: {
|
|
185
|
+
outputSelection: {
|
|
186
|
+
'mypath/MyContract.sol': {
|
|
187
|
+
'': ['ast'],
|
|
188
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata', 'storageLayout'],
|
|
189
|
+
},
|
|
190
|
+
'mypath/MyContractV2.sol': {
|
|
191
|
+
'': ['ast'],
|
|
192
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata'],
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
output: {
|
|
198
|
+
sources: {
|
|
199
|
+
'mypath/MyContract.sol': {
|
|
200
|
+
ast: {},
|
|
201
|
+
id: 123,
|
|
202
|
+
},
|
|
203
|
+
'mypath/MyContractV2.sol': {
|
|
204
|
+
ast: {},
|
|
205
|
+
id: 456,
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
const BUILD_INFO_PARTIAL_COMPILE = {
|
|
211
|
+
solcVersion: '0.8.9',
|
|
212
|
+
input: {
|
|
213
|
+
language: 'Solidity',
|
|
214
|
+
sources: {
|
|
215
|
+
'mypath/MyContract.sol': {
|
|
216
|
+
content: 'contract MyContract {}',
|
|
217
|
+
},
|
|
218
|
+
'mypath/MyContractV2.sol': {
|
|
219
|
+
content: 'contract MyContractV2 {}',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
settings: {
|
|
223
|
+
outputSelection: {
|
|
224
|
+
'mypath/MyContract.sol': {
|
|
225
|
+
'': ['ast'],
|
|
226
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata', 'storageLayout'],
|
|
227
|
+
},
|
|
228
|
+
'mypath/MyContractV2.sol': {
|
|
229
|
+
'': [],
|
|
230
|
+
'*': [],
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
output: {
|
|
236
|
+
sources: {
|
|
237
|
+
'mypath/MyContract.sol': {
|
|
238
|
+
ast: {},
|
|
239
|
+
id: 123,
|
|
240
|
+
},
|
|
241
|
+
'mypath/MyContractV2.sol': {
|
|
242
|
+
ast: {},
|
|
243
|
+
id: 456,
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
const BUILD_INFO_NO_OUTPUT_SELECTION = {
|
|
249
|
+
solcVersion: '0.8.9',
|
|
250
|
+
input: {
|
|
251
|
+
language: 'Solidity',
|
|
252
|
+
sources: {
|
|
253
|
+
'mypath/MyContract.sol': {
|
|
254
|
+
content: 'contract MyContract {}',
|
|
255
|
+
},
|
|
256
|
+
'mypath/MyContractV2.sol': {
|
|
257
|
+
content: 'contract MyContractV2 {}',
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
settings: {
|
|
261
|
+
outputSelection: {
|
|
262
|
+
'mypath/MyContract.sol': {
|
|
263
|
+
'*': [],
|
|
264
|
+
},
|
|
265
|
+
'mypath/MyContractV2.sol': {
|
|
266
|
+
'': [],
|
|
267
|
+
'*': [],
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
output: {
|
|
273
|
+
sources: {
|
|
274
|
+
'mypath/MyContract.sol': {
|
|
275
|
+
ast: {},
|
|
276
|
+
id: 123,
|
|
277
|
+
},
|
|
278
|
+
'mypath/MyContractV2.sol': {
|
|
279
|
+
ast: {},
|
|
280
|
+
id: 456,
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
};
|
|
96
285
|
ava_1.default.serial('get build info files - default hardhat', async (t) => {
|
|
97
286
|
await fs_1.promises.mkdir('artifacts/build-info', { recursive: true });
|
|
98
287
|
await fs_1.promises.mkdir('out/build-info', { recursive: true }); // should be ignored since it's empty
|
|
@@ -150,17 +339,53 @@ ava_1.default.serial('dir does not exist', async (t) => {
|
|
|
150
339
|
t.true(error?.message.includes('does not exist'));
|
|
151
340
|
});
|
|
152
341
|
ava_1.default.serial('no build info files', async (t) => {
|
|
153
|
-
|
|
154
|
-
await fs_1.promises.
|
|
155
|
-
|
|
342
|
+
const dir = 'empty-dir';
|
|
343
|
+
await fs_1.promises.mkdir(dir, { recursive: true });
|
|
344
|
+
await fs_1.promises.writeFile(`${dir}/notjson.txt`, 'abc');
|
|
345
|
+
const error = await t.throwsAsync((0, build_info_file_1.getBuildInfoFiles)(dir));
|
|
156
346
|
t.true(error?.message.includes('does not contain any build info files'));
|
|
157
347
|
});
|
|
158
348
|
ava_1.default.serial('no storage layout', async (t) => {
|
|
159
|
-
|
|
160
|
-
await fs_1.promises.
|
|
161
|
-
|
|
349
|
+
const dir = 'no-storage-layout';
|
|
350
|
+
await fs_1.promises.mkdir(dir, { recursive: true });
|
|
351
|
+
await fs_1.promises.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_NO_LAYOUT));
|
|
352
|
+
const error = await t.throwsAsync((0, build_info_file_1.getBuildInfoFiles)(dir));
|
|
162
353
|
t.true(error?.message.includes('does not contain storage layout'));
|
|
163
354
|
});
|
|
355
|
+
ava_1.default.serial('individual output selections - no layout', async (t) => {
|
|
356
|
+
const dir = 'individual-no-layout';
|
|
357
|
+
await fs_1.promises.mkdir(dir, { recursive: true });
|
|
358
|
+
await fs_1.promises.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_INDIVIDUAL_NO_LAYOUT));
|
|
359
|
+
const error = await t.throwsAsync((0, build_info_file_1.getBuildInfoFiles)(dir));
|
|
360
|
+
t.true(error?.message.includes('does not contain storage layout'));
|
|
361
|
+
});
|
|
362
|
+
ava_1.default.serial('individual output selections - has layout', async (t) => {
|
|
363
|
+
const dir = 'individual-has-layout';
|
|
364
|
+
await fs_1.promises.mkdir(dir, { recursive: true });
|
|
365
|
+
await fs_1.promises.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_INDIVIDUAL_HAS_LAYOUT));
|
|
366
|
+
t.assert((await (0, build_info_file_1.getBuildInfoFiles)(dir)).length === 1);
|
|
367
|
+
});
|
|
368
|
+
ava_1.default.serial('individual output selections - partial layout', async (t) => {
|
|
369
|
+
const dir = 'partial-layout';
|
|
370
|
+
await fs_1.promises.mkdir(dir, { recursive: true });
|
|
371
|
+
await fs_1.promises.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_PARTIAL_LAYOUT));
|
|
372
|
+
const error = await t.throwsAsync((0, build_info_file_1.getBuildInfoFiles)(dir));
|
|
373
|
+
t.true(error?.message.includes('does not contain storage layout'));
|
|
374
|
+
});
|
|
375
|
+
ava_1.default.serial('individual output selections - partial compile', async (t) => {
|
|
376
|
+
const dir = 'partial-compile';
|
|
377
|
+
await fs_1.promises.mkdir(dir, { recursive: true });
|
|
378
|
+
await fs_1.promises.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_PARTIAL_COMPILE));
|
|
379
|
+
const error = await t.throwsAsync((0, build_info_file_1.getBuildInfoFiles)(dir));
|
|
380
|
+
t.true(error?.message.includes('is not from a full compilation'));
|
|
381
|
+
});
|
|
382
|
+
ava_1.default.serial('no output selection', async (t) => {
|
|
383
|
+
const dir = 'no-output';
|
|
384
|
+
await fs_1.promises.mkdir(dir, { recursive: true });
|
|
385
|
+
await fs_1.promises.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_NO_OUTPUT_SELECTION));
|
|
386
|
+
const error = await t.throwsAsync((0, build_info_file_1.getBuildInfoFiles)(dir));
|
|
387
|
+
t.true(error?.message.includes('is not from a full compilation'));
|
|
388
|
+
});
|
|
164
389
|
function assertBuildInfoFiles(t, buildInfoFiles) {
|
|
165
390
|
t.is(buildInfoFiles.length, 2);
|
|
166
391
|
const buildInfoFile1 = buildInfoFiles.find(b => b.input.sources['mypath/MyContract.sol'].content === 'contract MyContract {}');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-info-file.test.js","sourceRoot":"","sources":["../../../src/cli/validate/build-info-file.test.ts"],"names":[],"mappings":";;;;;AAAA,8CAA6C;AAE7C,2BAAoC;AACpC,mCAAgC;AAChC,gDAAwB;AACxB,4CAAoB;AACpB,uDAAqE;AAErE,aAAI,CAAC,UAAU,CAAC,KAAK,EAAC,CAAC,EAAC,EAAE;IACxB,OAAO,CAAC,KAAK,CAAC,MAAM,aAAE,CAAC,OAAO,CAAC,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,MAAM,E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C,4BAA4B,CAAC,CAAC;KACtC;SAAM;QACL,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QACrE,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;KACtE;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"build-info-file.test.js","sourceRoot":"","sources":["../../../src/cli/validate/build-info-file.test.ts"],"names":[],"mappings":";;;;;AAAA,8CAA6C;AAE7C,2BAAoC;AACpC,mCAAgC;AAChC,gDAAwB;AACxB,4CAAoB;AACpB,uDAAqE;AAErE,aAAI,CAAC,UAAU,CAAC,KAAK,EAAC,CAAC,EAAC,EAAE;IACxB,OAAO,CAAC,KAAK,CAAC,MAAM,aAAE,CAAC,OAAO,CAAC,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,MAAM,EAAE,EAAE,sBAAsB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAChH,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;IACxB,MAAM,IAAA,eAAM,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG;IACjB,WAAW,EAAE,OAAO;IACpB,KAAK,EAAE;QACL,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE;YACP,uBAAuB,EAAE;gBACvB,OAAO,EAAE,wBAAwB;aAClC;SACF;QACD,QAAQ,EAAE;YACR,eAAe,EAAE;gBACf,GAAG,EAAE;oBACH,GAAG,EAAE,CAAC,eAAe,CAAC;iBACvB;aACF;SACF;KACF;IACD,MAAM,EAAE;QACN,OAAO,EAAE;YACP,uBAAuB,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elin/upgrades-core",
|
|
3
|
-
"version": "1.32.
|
|
3
|
+
"version": "1.32.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "https://github.com/OpenZeppelin/openzeppelin-upgrades/tree/master/packages/core",
|
|
6
6
|
"license": "MIT",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"proper-lockfile": "^4.1.1",
|
|
72
72
|
"solidity-ast": "^0.4.51"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "10749cc42b3e2140848b161123bfab7e5ea8ec53"
|
|
75
75
|
}
|
|
@@ -95,6 +95,200 @@ const BUILD_INFO_NO_LAYOUT = {
|
|
|
95
95
|
},
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
+
const BUILD_INFO_INDIVIDUAL_NO_LAYOUT = {
|
|
99
|
+
solcVersion: '0.8.9',
|
|
100
|
+
input: {
|
|
101
|
+
language: 'Solidity',
|
|
102
|
+
sources: {
|
|
103
|
+
'mypath/MyContract.sol': {
|
|
104
|
+
content: 'contract MyContract {}',
|
|
105
|
+
},
|
|
106
|
+
'mypath/MyContractV2.sol': {
|
|
107
|
+
content: 'contract MyContractV2 {}',
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
settings: {
|
|
111
|
+
outputSelection: {
|
|
112
|
+
'mypath/MyContract.sol': {
|
|
113
|
+
'': ['ast'],
|
|
114
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata'],
|
|
115
|
+
},
|
|
116
|
+
'mypath/MyContractV2.sol': {
|
|
117
|
+
'': ['ast'],
|
|
118
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata'],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
output: {
|
|
124
|
+
sources: {
|
|
125
|
+
'mypath/MyContract.sol': {
|
|
126
|
+
ast: {},
|
|
127
|
+
id: 123,
|
|
128
|
+
},
|
|
129
|
+
'mypath/MyContractV2.sol': {
|
|
130
|
+
ast: {},
|
|
131
|
+
id: 456,
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const BUILD_INFO_INDIVIDUAL_HAS_LAYOUT = {
|
|
138
|
+
solcVersion: '0.8.9',
|
|
139
|
+
input: {
|
|
140
|
+
language: 'Solidity',
|
|
141
|
+
sources: {
|
|
142
|
+
'mypath/MyContract.sol': {
|
|
143
|
+
content: 'contract MyContract {}',
|
|
144
|
+
},
|
|
145
|
+
'mypath/MyContractV2.sol': {
|
|
146
|
+
content: 'contract MyContractV2 {}',
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
settings: {
|
|
150
|
+
outputSelection: {
|
|
151
|
+
'mypath/MyContract.sol': {
|
|
152
|
+
'': ['ast'],
|
|
153
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata', 'storageLayout'],
|
|
154
|
+
},
|
|
155
|
+
'mypath/MyContractV2.sol': {
|
|
156
|
+
'': ['ast'],
|
|
157
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata', 'storageLayout'],
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
output: {
|
|
163
|
+
sources: {
|
|
164
|
+
'mypath/MyContract.sol': {
|
|
165
|
+
ast: {},
|
|
166
|
+
id: 123,
|
|
167
|
+
},
|
|
168
|
+
'mypath/MyContractV2.sol': {
|
|
169
|
+
ast: {},
|
|
170
|
+
id: 456,
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const BUILD_INFO_PARTIAL_LAYOUT = {
|
|
177
|
+
solcVersion: '0.8.9',
|
|
178
|
+
input: {
|
|
179
|
+
language: 'Solidity',
|
|
180
|
+
sources: {
|
|
181
|
+
'mypath/MyContract.sol': {
|
|
182
|
+
content: 'contract MyContract {}',
|
|
183
|
+
},
|
|
184
|
+
'mypath/MyContractV2.sol': {
|
|
185
|
+
content: 'contract MyContractV2 {}',
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
settings: {
|
|
189
|
+
outputSelection: {
|
|
190
|
+
'mypath/MyContract.sol': {
|
|
191
|
+
'': ['ast'],
|
|
192
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata', 'storageLayout'],
|
|
193
|
+
},
|
|
194
|
+
'mypath/MyContractV2.sol': {
|
|
195
|
+
'': ['ast'],
|
|
196
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata'],
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
output: {
|
|
202
|
+
sources: {
|
|
203
|
+
'mypath/MyContract.sol': {
|
|
204
|
+
ast: {},
|
|
205
|
+
id: 123,
|
|
206
|
+
},
|
|
207
|
+
'mypath/MyContractV2.sol': {
|
|
208
|
+
ast: {},
|
|
209
|
+
id: 456,
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
const BUILD_INFO_PARTIAL_COMPILE = {
|
|
216
|
+
solcVersion: '0.8.9',
|
|
217
|
+
input: {
|
|
218
|
+
language: 'Solidity',
|
|
219
|
+
sources: {
|
|
220
|
+
'mypath/MyContract.sol': {
|
|
221
|
+
content: 'contract MyContract {}',
|
|
222
|
+
},
|
|
223
|
+
'mypath/MyContractV2.sol': {
|
|
224
|
+
content: 'contract MyContractV2 {}',
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
settings: {
|
|
228
|
+
outputSelection: {
|
|
229
|
+
'mypath/MyContract.sol': {
|
|
230
|
+
'': ['ast'],
|
|
231
|
+
'*': ['abi', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'metadata', 'storageLayout'],
|
|
232
|
+
},
|
|
233
|
+
'mypath/MyContractV2.sol': {
|
|
234
|
+
'': [],
|
|
235
|
+
'*': [],
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
output: {
|
|
241
|
+
sources: {
|
|
242
|
+
'mypath/MyContract.sol': {
|
|
243
|
+
ast: {},
|
|
244
|
+
id: 123,
|
|
245
|
+
},
|
|
246
|
+
'mypath/MyContractV2.sol': {
|
|
247
|
+
ast: {},
|
|
248
|
+
id: 456,
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
const BUILD_INFO_NO_OUTPUT_SELECTION = {
|
|
255
|
+
solcVersion: '0.8.9',
|
|
256
|
+
input: {
|
|
257
|
+
language: 'Solidity',
|
|
258
|
+
sources: {
|
|
259
|
+
'mypath/MyContract.sol': {
|
|
260
|
+
content: 'contract MyContract {}',
|
|
261
|
+
},
|
|
262
|
+
'mypath/MyContractV2.sol': {
|
|
263
|
+
content: 'contract MyContractV2 {}',
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
settings: {
|
|
267
|
+
outputSelection: {
|
|
268
|
+
'mypath/MyContract.sol': {
|
|
269
|
+
'*': [],
|
|
270
|
+
},
|
|
271
|
+
'mypath/MyContractV2.sol': {
|
|
272
|
+
'': [],
|
|
273
|
+
'*': [],
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
output: {
|
|
279
|
+
sources: {
|
|
280
|
+
'mypath/MyContract.sol': {
|
|
281
|
+
ast: {},
|
|
282
|
+
id: 123,
|
|
283
|
+
},
|
|
284
|
+
'mypath/MyContractV2.sol': {
|
|
285
|
+
ast: {},
|
|
286
|
+
id: 456,
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
|
|
98
292
|
test.serial('get build info files - default hardhat', async t => {
|
|
99
293
|
await fs.mkdir('artifacts/build-info', { recursive: true });
|
|
100
294
|
await fs.mkdir('out/build-info', { recursive: true }); // should be ignored since it's empty
|
|
@@ -177,21 +371,74 @@ test.serial('dir does not exist', async t => {
|
|
|
177
371
|
});
|
|
178
372
|
|
|
179
373
|
test.serial('no build info files', async t => {
|
|
180
|
-
|
|
181
|
-
|
|
374
|
+
const dir = 'empty-dir';
|
|
375
|
+
|
|
376
|
+
await fs.mkdir(dir, { recursive: true });
|
|
377
|
+
await fs.writeFile(`${dir}/notjson.txt`, 'abc');
|
|
182
378
|
|
|
183
|
-
const error = await t.throwsAsync(getBuildInfoFiles(
|
|
379
|
+
const error = await t.throwsAsync(getBuildInfoFiles(dir));
|
|
184
380
|
t.true(error?.message.includes('does not contain any build info files'));
|
|
185
381
|
});
|
|
186
382
|
|
|
187
383
|
test.serial('no storage layout', async t => {
|
|
188
|
-
|
|
189
|
-
|
|
384
|
+
const dir = 'no-storage-layout';
|
|
385
|
+
|
|
386
|
+
await fs.mkdir(dir, { recursive: true });
|
|
387
|
+
await fs.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_NO_LAYOUT));
|
|
388
|
+
|
|
389
|
+
const error = await t.throwsAsync(getBuildInfoFiles(dir));
|
|
390
|
+
t.true(error?.message.includes('does not contain storage layout'));
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
test.serial('individual output selections - no layout', async t => {
|
|
394
|
+
const dir = 'individual-no-layout';
|
|
190
395
|
|
|
191
|
-
|
|
396
|
+
await fs.mkdir(dir, { recursive: true });
|
|
397
|
+
await fs.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_INDIVIDUAL_NO_LAYOUT));
|
|
398
|
+
|
|
399
|
+
const error = await t.throwsAsync(getBuildInfoFiles(dir));
|
|
192
400
|
t.true(error?.message.includes('does not contain storage layout'));
|
|
193
401
|
});
|
|
194
402
|
|
|
403
|
+
test.serial('individual output selections - has layout', async t => {
|
|
404
|
+
const dir = 'individual-has-layout';
|
|
405
|
+
|
|
406
|
+
await fs.mkdir(dir, { recursive: true });
|
|
407
|
+
await fs.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_INDIVIDUAL_HAS_LAYOUT));
|
|
408
|
+
|
|
409
|
+
t.assert((await getBuildInfoFiles(dir)).length === 1);
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
test.serial('individual output selections - partial layout', async t => {
|
|
413
|
+
const dir = 'partial-layout';
|
|
414
|
+
|
|
415
|
+
await fs.mkdir(dir, { recursive: true });
|
|
416
|
+
await fs.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_PARTIAL_LAYOUT));
|
|
417
|
+
|
|
418
|
+
const error = await t.throwsAsync(getBuildInfoFiles(dir));
|
|
419
|
+
t.true(error?.message.includes('does not contain storage layout'));
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
test.serial('individual output selections - partial compile', async t => {
|
|
423
|
+
const dir = 'partial-compile';
|
|
424
|
+
|
|
425
|
+
await fs.mkdir(dir, { recursive: true });
|
|
426
|
+
await fs.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_PARTIAL_COMPILE));
|
|
427
|
+
|
|
428
|
+
const error = await t.throwsAsync(getBuildInfoFiles(dir));
|
|
429
|
+
t.true(error?.message.includes('is not from a full compilation'));
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
test.serial('no output selection', async t => {
|
|
433
|
+
const dir = 'no-output';
|
|
434
|
+
|
|
435
|
+
await fs.mkdir(dir, { recursive: true });
|
|
436
|
+
await fs.writeFile(`${dir}/build-info.json`, JSON.stringify(BUILD_INFO_NO_OUTPUT_SELECTION));
|
|
437
|
+
|
|
438
|
+
const error = await t.throwsAsync(getBuildInfoFiles(dir));
|
|
439
|
+
t.true(error?.message.includes('is not from a full compilation'));
|
|
440
|
+
});
|
|
441
|
+
|
|
195
442
|
function assertBuildInfoFiles(t: ExecutionContext, buildInfoFiles: BuildInfoFile[]) {
|
|
196
443
|
t.is(buildInfoFiles.length, 2);
|
|
197
444
|
|
|
@@ -26,6 +26,10 @@ If using Foundry, include the "storageLayout" extra output in foundry.toml:
|
|
|
26
26
|
build_info = true
|
|
27
27
|
extra_output = ["storageLayout"]
|
|
28
28
|
Then recompile your contracts with '${FOUNDRY_COMPILE_COMMAND}' and try again.`;
|
|
29
|
+
const PARTIAL_COMPILE_HELP = `\
|
|
30
|
+
Recompile all contracts with one of the following commands and try again:
|
|
31
|
+
If using Hardhat: ${HARDHAT_COMPILE_COMMAND}
|
|
32
|
+
If using Foundry: ${FOUNDRY_COMPILE_COMMAND}`;
|
|
29
33
|
|
|
30
34
|
/**
|
|
31
35
|
* A build info file containing Solidity compiler input and output JSON objects.
|
|
@@ -133,12 +137,7 @@ async function readBuildInfo(buildInfoFilePaths: string[]) {
|
|
|
133
137
|
`Build info file ${buildInfoFilePath} must contain Solidity compiler input, output, and solcVersion.`,
|
|
134
138
|
);
|
|
135
139
|
} else {
|
|
136
|
-
|
|
137
|
-
throw new ValidateCommandError(
|
|
138
|
-
`Build info file ${buildInfoFilePath} does not contain storage layout.`,
|
|
139
|
-
() => STORAGE_LAYOUT_HELP,
|
|
140
|
-
);
|
|
141
|
-
}
|
|
140
|
+
checkOutputSelection(buildInfoJson, buildInfoFilePath);
|
|
142
141
|
|
|
143
142
|
buildInfoFiles.push({
|
|
144
143
|
input: buildInfoJson.input,
|
|
@@ -150,9 +149,27 @@ async function readBuildInfo(buildInfoFilePaths: string[]) {
|
|
|
150
149
|
return buildInfoFiles;
|
|
151
150
|
}
|
|
152
151
|
|
|
153
|
-
|
|
152
|
+
/**
|
|
153
|
+
* Gives an error if there is empty output selection for any contract, or a contract does not have storage layout.
|
|
154
|
+
*/
|
|
155
|
+
function checkOutputSelection(buildInfoJson: any, buildInfoFilePath: string) {
|
|
154
156
|
const o = buildInfoJson.input.settings?.outputSelection;
|
|
155
|
-
|
|
157
|
+
|
|
158
|
+
return Object.keys(o).forEach((item: any) => {
|
|
159
|
+
if ((o[item][''] === undefined || o[item][''].length === 0) && o[item]['*'].length === 0) {
|
|
160
|
+
// No outputs at all for this contract e.g. if there were no changes since the last compile in Foundry.
|
|
161
|
+
// This is not supported for now, since it leads to AST nodes that reference node ids in other build-info files.
|
|
162
|
+
throw new ValidateCommandError(
|
|
163
|
+
`Build info file ${buildInfoFilePath} is not from a full compilation.`,
|
|
164
|
+
() => PARTIAL_COMPILE_HELP,
|
|
165
|
+
);
|
|
166
|
+
} else if (!o[item]['*'].includes('storageLayout')) {
|
|
167
|
+
throw new ValidateCommandError(
|
|
168
|
+
`Build info file ${buildInfoFilePath} does not contain storage layout for all contracts.`,
|
|
169
|
+
() => STORAGE_LAYOUT_HELP,
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
156
173
|
}
|
|
157
174
|
|
|
158
175
|
async function readJSON(path: string) {
|