Skip to content

Commit 6fc11fc

Browse files
authored
Upgrade testnet contracts (#248)
* Upgrade testnet contracts And fixes some issues for it. Specially it uses unsafeSkipStorage to skip OZ collision check as they are very conservative and doesn't cover our valid memory changes. We should be very careful in memory changes now that we cannot use OZ collision check. * Address Tom comments
1 parent 2361793 commit 6fc11fc

15 files changed

+1689
-11
lines changed

ethereum/.openzeppelin/goerli.json

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,243 @@
216216
}
217217
}
218218
}
219+
},
220+
"3c985b75452a5df848682f7c4086f55b3bc5ca6309b336e21c37a1fb62ac5c8d": {
221+
"address": "0xBAEA4A1A2Eaa4E9bb78f2303C213Da152933170E",
222+
"txHash": "0x8942f96cd80407b10d80b35af1f333b3b40da897c401e528e6bb1aee80ab4d96",
223+
"layout": {
224+
"storage": [
225+
{
226+
"contract": "Initializable",
227+
"label": "_initialized",
228+
"type": "t_bool",
229+
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:39"
230+
},
231+
{
232+
"contract": "Initializable",
233+
"label": "_initializing",
234+
"type": "t_bool",
235+
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:44"
236+
},
237+
{
238+
"contract": "ContextUpgradeable",
239+
"label": "__gap",
240+
"type": "t_array(t_uint256)50_storage",
241+
"src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
242+
},
243+
{
244+
"contract": "OwnableUpgradeable",
245+
"label": "_owner",
246+
"type": "t_address",
247+
"src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
248+
},
249+
{
250+
"contract": "OwnableUpgradeable",
251+
"label": "__gap",
252+
"type": "t_array(t_uint256)49_storage",
253+
"src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:87"
254+
},
255+
{
256+
"contract": "ERC1967UpgradeUpgradeable",
257+
"label": "__gap",
258+
"type": "t_array(t_uint256)50_storage",
259+
"src": "../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211"
260+
},
261+
{
262+
"contract": "UUPSUpgradeable",
263+
"label": "__gap",
264+
"type": "t_array(t_uint256)50_storage",
265+
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107"
266+
},
267+
{
268+
"contract": "PythState",
269+
"label": "_state",
270+
"type": "t_struct(State)3914_storage",
271+
"src": "../project:/contracts/pyth/PythState.sol:30"
272+
}
273+
],
274+
"types": {
275+
"t_struct(State)3914_storage": {
276+
"label": "struct PythStorage.State",
277+
"members": [
278+
{
279+
"label": "wormhole",
280+
"type": "t_address"
281+
},
282+
{
283+
"label": "_deprecatedPyth2WormholeChainId",
284+
"type": "t_uint16"
285+
},
286+
{
287+
"label": "_deprecatedPyth2WormholeEmitter",
288+
"type": "t_bytes32"
289+
},
290+
{
291+
"label": "latestPriceInfo",
292+
"type": "t_mapping(t_bytes32,t_struct(PriceInfo)3809_storage)"
293+
},
294+
{
295+
"label": "validDataSources",
296+
"type": "t_array(t_struct(DataSource)3814_storage)dyn_storage"
297+
},
298+
{
299+
"label": "isValidDataSource",
300+
"type": "t_mapping(t_bytes32,t_bool)"
301+
},
302+
{
303+
"label": "singleUpdateFeeInWei",
304+
"type": "t_uint256"
305+
}
306+
]
307+
},
308+
"t_address": {
309+
"label": "address"
310+
},
311+
"t_uint16": {
312+
"label": "uint16"
313+
},
314+
"t_bytes32": {
315+
"label": "bytes32"
316+
},
317+
"t_mapping(t_bytes32,t_struct(PriceInfo)3809_storage)": {
318+
"label": "mapping(bytes32 => struct PythInternalStructs.PriceInfo)"
319+
},
320+
"t_struct(PriceInfo)3809_storage": {
321+
"label": "struct PythInternalStructs.PriceInfo",
322+
"members": [
323+
{
324+
"label": "attestationTime",
325+
"type": "t_uint256"
326+
},
327+
{
328+
"label": "arrivalTime",
329+
"type": "t_uint256"
330+
},
331+
{
332+
"label": "arrivalBlock",
333+
"type": "t_uint256"
334+
},
335+
{
336+
"label": "priceFeed",
337+
"type": "t_struct(PriceFeed)2275_storage"
338+
}
339+
]
340+
},
341+
"t_array(t_struct(DataSource)3814_storage)dyn_storage": {
342+
"label": "struct PythInternalStructs.DataSource[]"
343+
},
344+
"t_struct(DataSource)3814_storage": {
345+
"label": "struct PythInternalStructs.DataSource",
346+
"members": [
347+
{
348+
"label": "chainId",
349+
"type": "t_uint16"
350+
},
351+
{
352+
"label": "emitterAddress",
353+
"type": "t_bytes32"
354+
}
355+
]
356+
},
357+
"t_mapping(t_bytes32,t_bool)": {
358+
"label": "mapping(bytes32 => bool)"
359+
},
360+
"t_bool": {
361+
"label": "bool"
362+
},
363+
"t_uint256": {
364+
"label": "uint256"
365+
},
366+
"t_struct(PriceFeed)2275_storage": {
367+
"label": "struct PythStructs.PriceFeed",
368+
"members": [
369+
{
370+
"label": "id",
371+
"type": "t_bytes32"
372+
},
373+
{
374+
"label": "productId",
375+
"type": "t_bytes32"
376+
},
377+
{
378+
"label": "price",
379+
"type": "t_int64"
380+
},
381+
{
382+
"label": "conf",
383+
"type": "t_uint64"
384+
},
385+
{
386+
"label": "expo",
387+
"type": "t_int32"
388+
},
389+
{
390+
"label": "status",
391+
"type": "t_enum(PriceStatus)2280"
392+
},
393+
{
394+
"label": "maxNumPublishers",
395+
"type": "t_uint32"
396+
},
397+
{
398+
"label": "numPublishers",
399+
"type": "t_uint32"
400+
},
401+
{
402+
"label": "emaPrice",
403+
"type": "t_int64"
404+
},
405+
{
406+
"label": "emaConf",
407+
"type": "t_uint64"
408+
},
409+
{
410+
"label": "publishTime",
411+
"type": "t_uint64"
412+
},
413+
{
414+
"label": "prevPrice",
415+
"type": "t_int64"
416+
},
417+
{
418+
"label": "prevConf",
419+
"type": "t_uint64"
420+
},
421+
{
422+
"label": "prevPublishTime",
423+
"type": "t_uint64"
424+
}
425+
]
426+
},
427+
"t_int64": {
428+
"label": "int64"
429+
},
430+
"t_uint64": {
431+
"label": "uint64"
432+
},
433+
"t_int32": {
434+
"label": "int32"
435+
},
436+
"t_enum(PriceStatus)2280": {
437+
"label": "enum PythStructs.PriceStatus",
438+
"members": [
439+
"UNKNOWN",
440+
"TRADING",
441+
"HALTED",
442+
"AUCTION"
443+
]
444+
},
445+
"t_uint32": {
446+
"label": "uint32"
447+
},
448+
"t_array(t_uint256)50_storage": {
449+
"label": "uint256[50]"
450+
},
451+
"t_array(t_uint256)49_storage": {
452+
"label": "uint256[49]"
453+
}
454+
}
455+
}
219456
}
220457
}
221458
}

0 commit comments

Comments
 (0)