diff --git a/ethereum/.env.cluster.mainnet b/ethereum/.env.cluster.mainnet index e2ac9226d5..6b90207711 100644 --- a/ethereum/.env.cluster.mainnet +++ b/ethereum/.env.cluster.mainnet @@ -8,3 +8,8 @@ GOVERNANCE_EMITTER=0x5635979a221c34931e32620b9293a463065555ea71fe97cd6237ade875b MIGRATION_12_SET_FEE_VAA=0x01000000020d00c0749e12c5a921d38934aea2025e2748b589bc887b071649ad7e55c9356c942f11f0a731b57b4540136d3fdf0fa76a79b2c270cfb56457544ebcdc2bfa1de1bf00034855f23564ec5d9540c0a45d38ddbfdafe5ad7864e5e539f8233b9d1c35e78654fbb48bfde2ba995437bfb38b92be272224b34d8df2df54d8e478eba53f637e00106af3e7ba2f6891b79564270b549ac93f81d02cca85d80ea3bdf2fa0b5fc9831f04088cc644b65e37853d84150f5e7577946c1bf5b58fdce779c5890506a4a639800083b2fed7f4ae9ebe1be7d952be53ffeebc42f03ab2ebbb6d10fcbee34530857083537ec32154cf4c6c298401828145a095eca8d901c6bd34fd3dcbe51a95d9bf40109bd66527f6553a8fd3429305d4a18822d53104b299c9df15ec9437c75bdab9c3c7f55f7c8993283972e5c98a837f5c79e1ccd234330235829f745e97aa1ede88e010afa65862b5b74eab87b72d91cc026629bd82928424a7b85191fcc430cd5cd2ceb25438aa8a346c26585e2c74d00f460e9225e764969e218203fd9f9c41b3cdb2b010b95a4707053581ba586f4463bb6592420942beb1ef5060d7ff87f8980c0cc33526499643f25eb61939b6245a10cd1deb998ff3cf2a30586d336ab7b57424c5419000c12547c3b942944106d126151036f58d7382cdaea2c5bdd12fa5cb359ff0bf56c470ef714ff33313e3d76b36e12f76378d747417ad40cc73b1ad9050d40e50633010dbc7b13e8175715273342e7577018a5d2d22ee83c4916eac8996886568145244e2be027c0739593d10104f55661d4589ff1d45deb80918324e7888db7e0419f03000e12e244ada40eb8d3c1bdce80d4abd5efa9c57cd5bafc1b123f0539c2106aa8474cd250b1d7fffaeb922e6c54a3ce050fc221177d1c56cc784a4e8c76925a3804000f476f02d40ceaa24ee311f50f0486b047ec3ba4d985e771f08941ab81e184bb275e50a0cc2d738b178ef2c982db28e1eac5eaf87658716a5c3959689240ffd7670010f0a374448b3abc05f1cb765f7d8c790d1c34044a8145380557d42077f9bb027d6e29e013360809702e7a8a407b6abd63036d269d1a1abe66f69a7f73d0bb9209001210be861c7f88caa19c8afcdbd2c9fda6c35c68933e7d3a470b916fa4d47fa62868cf38c022764d542ed9a4ddba81ae093aa1e1ecad88f79c9d879e5484bb9b5b01634878210000000000015635979a221c34931e32620b9293a463065555ea71fe97cd6237ade875b12e9e000000000000000c015054474d0103000000000000000000010000000000000000 SINGLE_UPDATE_FEE_IN_WEI=1 + +# Only used for networks with Wormhole receiver +INIT_SIGNERS=["0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5"] +INIT_GOV_CHAIN_ID=0x1 +INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004 diff --git a/ethereum/.env.cluster.testnet b/ethereum/.env.cluster.testnet index 122e9df301..26a5cd774b 100644 --- a/ethereum/.env.cluster.testnet +++ b/ethereum/.env.cluster.testnet @@ -8,3 +8,8 @@ GOVERNANCE_EMITTER=0x63278d271099bfd491951b3e648f08b1c71631e4a53674ad43e8f9f9806 MIGRATION_12_SET_FEE_VAA=0x010000000001006c844a6f378ddc46842e61552db124bf384d7fb2410584cdc8f3be8cc864b2d169cd9640f23c72e80ac119f10614bb22570731ce9cd8999501cb9178ad7b27e80063471aea00000000000163278d271099bfd491951b3e648f08b1c71631e4a53674ad43e8f9f98068c3850000000000000006015054474d0103000000000000000000010000000000000000 SINGLE_UPDATE_FEE_IN_WEI=1 + +# Only used for networks with Wormhole receiver +INIT_SIGNERS=["0x13947Bd48b18E53fdAeEe77F3473391aC727C638"] +INIT_GOV_CHAIN_ID=0x1 +INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004 diff --git a/ethereum/.env.prod.celo b/ethereum/.env.prod.celo new file mode 100644 index 0000000000..71ce78a25d --- /dev/null +++ b/ethereum/.env.prod.celo @@ -0,0 +1,5 @@ +MIGRATIONS_DIR=./migrations/prod +MIGRATIONS_NETWORK=celo +WORMHOLE_CHAIN_NAME=celo +CLUSTER=mainnet +VALID_TIME_PERIOD_SECONDS=60 diff --git a/ethereum/.env.prod.celo_alfajores_testnet b/ethereum/.env.prod.celo_alfajores_testnet new file mode 100644 index 0000000000..25b04314d5 --- /dev/null +++ b/ethereum/.env.prod.celo_alfajores_testnet @@ -0,0 +1,5 @@ +MIGRATIONS_DIR=./migrations/prod +MIGRATIONS_NETWORK=celo_alfajores_testnet +WORMHOLE_CHAIN_NAME=celo +CLUSTER=testnet +VALID_TIME_PERIOD_SECONDS=60 diff --git a/ethereum/.env.prod.cronos b/ethereum/.env.prod.cronos new file mode 100644 index 0000000000..e366dfeeb8 --- /dev/null +++ b/ethereum/.env.prod.cronos @@ -0,0 +1,5 @@ +MIGRATIONS_DIR=./migrations/prod-receiver +MIGRATIONS_NETWORK=cronos +WORMHOLE_CHAIN_NAME=cronos +CLUSTER=mainnet +VALID_TIME_PERIOD_SECONDS=60 diff --git a/ethereum/.env.prod.cronos_testnet b/ethereum/.env.prod.cronos_testnet new file mode 100644 index 0000000000..d88acbb5cf --- /dev/null +++ b/ethereum/.env.prod.cronos_testnet @@ -0,0 +1,5 @@ +MIGRATIONS_DIR=./migrations/prod-receiver +MIGRATIONS_NETWORK=cronos_testnet +WORMHOLE_CHAIN_NAME=cronos +CLUSTER=testnet +VALID_TIME_PERIOD_SECONDS=60 diff --git a/ethereum/.env.prod.kcc b/ethereum/.env.prod.kcc new file mode 100644 index 0000000000..b12857632e --- /dev/null +++ b/ethereum/.env.prod.kcc @@ -0,0 +1,5 @@ +MIGRATIONS_DIR=./migrations/prod-receiver +MIGRATIONS_NETWORK=kcc +WORMHOLE_CHAIN_NAME=kcc +CLUSTER=mainnet +VALID_TIME_PERIOD_SECONDS=60 diff --git a/ethereum/.env.prod.kcc_testnet b/ethereum/.env.prod.kcc_testnet new file mode 100644 index 0000000000..3db04520b6 --- /dev/null +++ b/ethereum/.env.prod.kcc_testnet @@ -0,0 +1,5 @@ +MIGRATIONS_DIR=./migrations/prod-receiver +MIGRATIONS_NETWORK=kcc_testnet +WORMHOLE_CHAIN_NAME=kcc +CLUSTER=testnet +VALID_TIME_PERIOD_SECONDS=60 diff --git a/ethereum/.env.prod.zksync b/ethereum/.env.prod.zksync new file mode 100644 index 0000000000..6a009b1dd2 --- /dev/null +++ b/ethereum/.env.prod.zksync @@ -0,0 +1,5 @@ +MIGRATIONS_DIR=./migrations/prod-receiver +MIGRATIONS_NETWORK=zksync +WORMHOLE_CHAIN_NAME=zksync +CLUSTER=mainnet +VALID_TIME_PERIOD_SECONDS=60 diff --git a/ethereum/.env.prod.zksync_testnet b/ethereum/.env.prod.zksync_testnet new file mode 100644 index 0000000000..0da9a1ff8f --- /dev/null +++ b/ethereum/.env.prod.zksync_testnet @@ -0,0 +1,5 @@ +MIGRATIONS_DIR=./migrations/prod-receiver +MIGRATIONS_NETWORK=zksync_testnet +WORMHOLE_CHAIN_NAME=zksync +CLUSTER=testnet +VALID_TIME_PERIOD_SECONDS=60 diff --git a/ethereum/.env.template b/ethereum/.env.template index b0067e02ec..36ee34e03c 100644 --- a/ethereum/.env.template +++ b/ethereum/.env.template @@ -8,7 +8,7 @@ MIGRATIONS_NETWORK= # xyz # This value should derive from Pyth to wormhole latency, and target chain blocktime and latency. VALID_TIME_PERIOD_SECONDS= # 60 -WORMHOLE_CHAIN_NAME= # ethereum, defined in https://github.com/wormhole-foundation/wormhole/blob/dev.v2/sdk/js/src/utils/consts.ts +WORMHOLE_CHAIN_NAME= # ethereum, defined in /third_party/pyth/xc-governance-sdk-js/src/chains.ts CLUSTER= #mainnet/testnet The configs below are read from the cluster file diff --git a/ethereum/.openzeppelin/unknown-25.json b/ethereum/.openzeppelin/unknown-25.json new file mode 100644 index 0000000000..41de8c4d52 --- /dev/null +++ b/ethereum/.openzeppelin/unknown-25.json @@ -0,0 +1,362 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0xE0d0e68297772Dd5a1f1D99897c581E2082dbA5B", + "txHash": "0x229f14684a49c10c4184009bfcf7a324e8f7ec0211deee51899c8afdeaa37fe5", + "kind": "uups" + } + ], + "impls": { + "fd85319df5664c4344cfee5e5680ccc4a692989c690fefaf0d6f65f782b5459f": { + "address": "0x15D35b8985e350f783fe3d95401401E194ff1E6f", + "txHash": "0x0812c92e779f0fe35f2440c7fe8245f6bf3496e95f5f9713e9953785c157c6db", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:39" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:44" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "contract": "OwnableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:87" + }, + { + "contract": "ERC1967UpgradeUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "contract": "UUPSUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "contract": "PythState", + "label": "_state", + "type": "t_struct(State)5849_storage", + "src": "../project:/contracts/pyth/PythState.sol:45" + } + ], + "types": { + "t_struct(State)5849_storage": { + "label": "struct PythStorage.State", + "members": [ + { + "label": "wormhole", + "type": "t_address" + }, + { + "label": "_deprecatedPyth2WormholeChainId", + "type": "t_uint16" + }, + { + "label": "_deprecatedPyth2WormholeEmitter", + "type": "t_bytes32" + }, + { + "label": "_deprecatedLatestPriceInfoV1", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)" + }, + { + "label": "validDataSources", + "type": "t_array(t_struct(DataSource)5703_storage)dyn_storage" + }, + { + "label": "isValidDataSource", + "type": "t_mapping(t_bytes32,t_bool)" + }, + { + "label": "singleUpdateFeeInWei", + "type": "t_uint256" + }, + { + "label": "validTimePeriodSeconds", + "type": "t_uint256" + }, + { + "label": "governanceDataSource", + "type": "t_struct(DataSource)5703_storage" + }, + { + "label": "lastExecutedGovernanceSequence", + "type": "t_uint64" + }, + { + "label": "_deprecatedLatestPriceInfoV2", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)" + }, + { + "label": "governanceDataSourceIndex", + "type": "t_uint32" + }, + { + "label": "latestPriceInfo", + "type": "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)" + } + ] + }, + "t_address": { + "label": "address" + }, + "t_uint16": { + "label": "uint16" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV1)" + }, + "t_struct(DeprecatedPriceInfoV1)4485_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV1", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV1)4475_storage" + } + ] + }, + "t_array(t_struct(DataSource)5703_storage)dyn_storage": { + "label": "struct PythInternalStructs.DataSource[]" + }, + "t_struct(DataSource)5703_storage": { + "label": "struct PythInternalStructs.DataSource", + "members": [ + { + "label": "chainId", + "type": "t_uint16" + }, + { + "label": "emitterAddress", + "type": "t_bytes32" + } + ] + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)" + }, + "t_bool": { + "label": "bool" + }, + "t_uint256": { + "label": "uint256" + }, + "t_uint64": { + "label": "uint64" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV2)" + }, + "t_struct(DeprecatedPriceInfoV2)4513_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV2", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV2)4503_storage" + } + ] + }, + "t_uint32": { + "label": "uint32" + }, + "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)": { + "label": "mapping(bytes32 => struct PythInternalStructs.PriceInfo)" + }, + "t_struct(PriceInfo)5698_storage": { + "label": "struct PythInternalStructs.PriceInfo", + "members": [ + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV1)4475_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV1", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "productId", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "status", + "type": "t_enum(DeprecatedPriceStatusV1)4445" + }, + { + "label": "maxNumPublishers", + "type": "t_uint32" + }, + { + "label": "numPublishers", + "type": "t_uint32" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + }, + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "prevPrice", + "type": "t_int64" + }, + { + "label": "prevConf", + "type": "t_uint64" + }, + { + "label": "prevPublishTime", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV2)4503_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV2", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + }, + { + "label": "emaPrice", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + } + ] + }, + "t_int32": { + "label": "int32" + }, + "t_int64": { + "label": "int64" + }, + "t_enum(DeprecatedPriceStatusV1)4445": { + "label": "enum PythDeprecatedStructs.DeprecatedPriceStatusV1", + "members": ["UNKNOWN", "TRADING", "HALTED", "AUCTION"] + }, + "t_struct(DeprecatedPriceV2)4494_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceV2", + "members": [ + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "publishTime", + "type": "t_uint256" + } + ] + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + } + } + } + } + } +} diff --git a/ethereum/.openzeppelin/unknown-321.json b/ethereum/.openzeppelin/unknown-321.json new file mode 100644 index 0000000000..263e606b96 --- /dev/null +++ b/ethereum/.openzeppelin/unknown-321.json @@ -0,0 +1,362 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0xE0d0e68297772Dd5a1f1D99897c581E2082dbA5B", + "txHash": "0xba07e137830ee2ab629e480f32f6a3e751e75fe2dd4bc2f59854820129485668", + "kind": "uups" + } + ], + "impls": { + "fd85319df5664c4344cfee5e5680ccc4a692989c690fefaf0d6f65f782b5459f": { + "address": "0xE5483Bf7fc740675B44dCd4b0f90983F8689D804", + "txHash": "0xf95ffe75ce248ddc214651b5e11c6fd64c1480b06598d39ef38c56451a18c267", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:39" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:44" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "contract": "OwnableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:87" + }, + { + "contract": "ERC1967UpgradeUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "contract": "UUPSUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "contract": "PythState", + "label": "_state", + "type": "t_struct(State)5849_storage", + "src": "../project:/contracts/pyth/PythState.sol:45" + } + ], + "types": { + "t_struct(State)5849_storage": { + "label": "struct PythStorage.State", + "members": [ + { + "label": "wormhole", + "type": "t_address" + }, + { + "label": "_deprecatedPyth2WormholeChainId", + "type": "t_uint16" + }, + { + "label": "_deprecatedPyth2WormholeEmitter", + "type": "t_bytes32" + }, + { + "label": "_deprecatedLatestPriceInfoV1", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)" + }, + { + "label": "validDataSources", + "type": "t_array(t_struct(DataSource)5703_storage)dyn_storage" + }, + { + "label": "isValidDataSource", + "type": "t_mapping(t_bytes32,t_bool)" + }, + { + "label": "singleUpdateFeeInWei", + "type": "t_uint256" + }, + { + "label": "validTimePeriodSeconds", + "type": "t_uint256" + }, + { + "label": "governanceDataSource", + "type": "t_struct(DataSource)5703_storage" + }, + { + "label": "lastExecutedGovernanceSequence", + "type": "t_uint64" + }, + { + "label": "_deprecatedLatestPriceInfoV2", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)" + }, + { + "label": "governanceDataSourceIndex", + "type": "t_uint32" + }, + { + "label": "latestPriceInfo", + "type": "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)" + } + ] + }, + "t_address": { + "label": "address" + }, + "t_uint16": { + "label": "uint16" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV1)" + }, + "t_struct(DeprecatedPriceInfoV1)4485_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV1", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV1)4475_storage" + } + ] + }, + "t_array(t_struct(DataSource)5703_storage)dyn_storage": { + "label": "struct PythInternalStructs.DataSource[]" + }, + "t_struct(DataSource)5703_storage": { + "label": "struct PythInternalStructs.DataSource", + "members": [ + { + "label": "chainId", + "type": "t_uint16" + }, + { + "label": "emitterAddress", + "type": "t_bytes32" + } + ] + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)" + }, + "t_bool": { + "label": "bool" + }, + "t_uint256": { + "label": "uint256" + }, + "t_uint64": { + "label": "uint64" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV2)" + }, + "t_struct(DeprecatedPriceInfoV2)4513_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV2", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV2)4503_storage" + } + ] + }, + "t_uint32": { + "label": "uint32" + }, + "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)": { + "label": "mapping(bytes32 => struct PythInternalStructs.PriceInfo)" + }, + "t_struct(PriceInfo)5698_storage": { + "label": "struct PythInternalStructs.PriceInfo", + "members": [ + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV1)4475_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV1", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "productId", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "status", + "type": "t_enum(DeprecatedPriceStatusV1)4445" + }, + { + "label": "maxNumPublishers", + "type": "t_uint32" + }, + { + "label": "numPublishers", + "type": "t_uint32" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + }, + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "prevPrice", + "type": "t_int64" + }, + { + "label": "prevConf", + "type": "t_uint64" + }, + { + "label": "prevPublishTime", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV2)4503_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV2", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + }, + { + "label": "emaPrice", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + } + ] + }, + "t_int32": { + "label": "int32" + }, + "t_int64": { + "label": "int64" + }, + "t_enum(DeprecatedPriceStatusV1)4445": { + "label": "enum PythDeprecatedStructs.DeprecatedPriceStatusV1", + "members": ["UNKNOWN", "TRADING", "HALTED", "AUCTION"] + }, + "t_struct(DeprecatedPriceV2)4494_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceV2", + "members": [ + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "publishTime", + "type": "t_uint256" + } + ] + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + } + } + } + } + } +} diff --git a/ethereum/.openzeppelin/unknown-322.json b/ethereum/.openzeppelin/unknown-322.json new file mode 100644 index 0000000000..26a93407d8 --- /dev/null +++ b/ethereum/.openzeppelin/unknown-322.json @@ -0,0 +1,362 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0x15D35b8985e350f783fe3d95401401E194ff1E6f", + "txHash": "0xfb01e67fb897d60854eaabfe1f7c1b5f9c773be5be62cc6f976a58fc8133980d", + "kind": "uups" + } + ], + "impls": { + "fd85319df5664c4344cfee5e5680ccc4a692989c690fefaf0d6f65f782b5459f": { + "address": "0xE5483Bf7fc740675B44dCd4b0f90983F8689D804", + "txHash": "0xe130223c34053666477d1f512e240bc74f41f3a2262fbdfb469eabe1a32cba69", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:39" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:44" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "contract": "OwnableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:87" + }, + { + "contract": "ERC1967UpgradeUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "contract": "UUPSUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "contract": "PythState", + "label": "_state", + "type": "t_struct(State)5849_storage", + "src": "../project:/contracts/pyth/PythState.sol:45" + } + ], + "types": { + "t_struct(State)5849_storage": { + "label": "struct PythStorage.State", + "members": [ + { + "label": "wormhole", + "type": "t_address" + }, + { + "label": "_deprecatedPyth2WormholeChainId", + "type": "t_uint16" + }, + { + "label": "_deprecatedPyth2WormholeEmitter", + "type": "t_bytes32" + }, + { + "label": "_deprecatedLatestPriceInfoV1", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)" + }, + { + "label": "validDataSources", + "type": "t_array(t_struct(DataSource)5703_storage)dyn_storage" + }, + { + "label": "isValidDataSource", + "type": "t_mapping(t_bytes32,t_bool)" + }, + { + "label": "singleUpdateFeeInWei", + "type": "t_uint256" + }, + { + "label": "validTimePeriodSeconds", + "type": "t_uint256" + }, + { + "label": "governanceDataSource", + "type": "t_struct(DataSource)5703_storage" + }, + { + "label": "lastExecutedGovernanceSequence", + "type": "t_uint64" + }, + { + "label": "_deprecatedLatestPriceInfoV2", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)" + }, + { + "label": "governanceDataSourceIndex", + "type": "t_uint32" + }, + { + "label": "latestPriceInfo", + "type": "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)" + } + ] + }, + "t_address": { + "label": "address" + }, + "t_uint16": { + "label": "uint16" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV1)" + }, + "t_struct(DeprecatedPriceInfoV1)4485_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV1", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV1)4475_storage" + } + ] + }, + "t_array(t_struct(DataSource)5703_storage)dyn_storage": { + "label": "struct PythInternalStructs.DataSource[]" + }, + "t_struct(DataSource)5703_storage": { + "label": "struct PythInternalStructs.DataSource", + "members": [ + { + "label": "chainId", + "type": "t_uint16" + }, + { + "label": "emitterAddress", + "type": "t_bytes32" + } + ] + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)" + }, + "t_bool": { + "label": "bool" + }, + "t_uint256": { + "label": "uint256" + }, + "t_uint64": { + "label": "uint64" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV2)" + }, + "t_struct(DeprecatedPriceInfoV2)4513_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV2", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV2)4503_storage" + } + ] + }, + "t_uint32": { + "label": "uint32" + }, + "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)": { + "label": "mapping(bytes32 => struct PythInternalStructs.PriceInfo)" + }, + "t_struct(PriceInfo)5698_storage": { + "label": "struct PythInternalStructs.PriceInfo", + "members": [ + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV1)4475_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV1", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "productId", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "status", + "type": "t_enum(DeprecatedPriceStatusV1)4445" + }, + { + "label": "maxNumPublishers", + "type": "t_uint32" + }, + { + "label": "numPublishers", + "type": "t_uint32" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + }, + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "prevPrice", + "type": "t_int64" + }, + { + "label": "prevConf", + "type": "t_uint64" + }, + { + "label": "prevPublishTime", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV2)4503_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV2", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + }, + { + "label": "emaPrice", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + } + ] + }, + "t_int32": { + "label": "int32" + }, + "t_int64": { + "label": "int64" + }, + "t_enum(DeprecatedPriceStatusV1)4445": { + "label": "enum PythDeprecatedStructs.DeprecatedPriceStatusV1", + "members": ["UNKNOWN", "TRADING", "HALTED", "AUCTION"] + }, + "t_struct(DeprecatedPriceV2)4494_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceV2", + "members": [ + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "publishTime", + "type": "t_uint256" + } + ] + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + } + } + } + } + } +} diff --git a/ethereum/.openzeppelin/unknown-338.json b/ethereum/.openzeppelin/unknown-338.json new file mode 100644 index 0000000000..ecc5af76c9 --- /dev/null +++ b/ethereum/.openzeppelin/unknown-338.json @@ -0,0 +1,362 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0xBAEA4A1A2Eaa4E9bb78f2303C213Da152933170E", + "txHash": "0x507d747b3c978794cc880a201c009d37367f66925b930c0cebc30c493c9d31eb", + "kind": "uups" + } + ], + "impls": { + "fd85319df5664c4344cfee5e5680ccc4a692989c690fefaf0d6f65f782b5459f": { + "address": "0xF89C7b475821EC3fDC2dC8099032c05c6c0c9AB9", + "txHash": "0xf971a36df441d6eb1acc4086864915a8e3ee2948f09a9744ce8df381654893df", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:39" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:44" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "contract": "OwnableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:87" + }, + { + "contract": "ERC1967UpgradeUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "contract": "UUPSUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "contract": "PythState", + "label": "_state", + "type": "t_struct(State)5849_storage", + "src": "../project:/contracts/pyth/PythState.sol:45" + } + ], + "types": { + "t_struct(State)5849_storage": { + "label": "struct PythStorage.State", + "members": [ + { + "label": "wormhole", + "type": "t_address" + }, + { + "label": "_deprecatedPyth2WormholeChainId", + "type": "t_uint16" + }, + { + "label": "_deprecatedPyth2WormholeEmitter", + "type": "t_bytes32" + }, + { + "label": "_deprecatedLatestPriceInfoV1", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)" + }, + { + "label": "validDataSources", + "type": "t_array(t_struct(DataSource)5703_storage)dyn_storage" + }, + { + "label": "isValidDataSource", + "type": "t_mapping(t_bytes32,t_bool)" + }, + { + "label": "singleUpdateFeeInWei", + "type": "t_uint256" + }, + { + "label": "validTimePeriodSeconds", + "type": "t_uint256" + }, + { + "label": "governanceDataSource", + "type": "t_struct(DataSource)5703_storage" + }, + { + "label": "lastExecutedGovernanceSequence", + "type": "t_uint64" + }, + { + "label": "_deprecatedLatestPriceInfoV2", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)" + }, + { + "label": "governanceDataSourceIndex", + "type": "t_uint32" + }, + { + "label": "latestPriceInfo", + "type": "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)" + } + ] + }, + "t_address": { + "label": "address" + }, + "t_uint16": { + "label": "uint16" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV1)" + }, + "t_struct(DeprecatedPriceInfoV1)4485_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV1", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV1)4475_storage" + } + ] + }, + "t_array(t_struct(DataSource)5703_storage)dyn_storage": { + "label": "struct PythInternalStructs.DataSource[]" + }, + "t_struct(DataSource)5703_storage": { + "label": "struct PythInternalStructs.DataSource", + "members": [ + { + "label": "chainId", + "type": "t_uint16" + }, + { + "label": "emitterAddress", + "type": "t_bytes32" + } + ] + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)" + }, + "t_bool": { + "label": "bool" + }, + "t_uint256": { + "label": "uint256" + }, + "t_uint64": { + "label": "uint64" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV2)" + }, + "t_struct(DeprecatedPriceInfoV2)4513_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV2", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV2)4503_storage" + } + ] + }, + "t_uint32": { + "label": "uint32" + }, + "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)": { + "label": "mapping(bytes32 => struct PythInternalStructs.PriceInfo)" + }, + "t_struct(PriceInfo)5698_storage": { + "label": "struct PythInternalStructs.PriceInfo", + "members": [ + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV1)4475_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV1", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "productId", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "status", + "type": "t_enum(DeprecatedPriceStatusV1)4445" + }, + { + "label": "maxNumPublishers", + "type": "t_uint32" + }, + { + "label": "numPublishers", + "type": "t_uint32" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + }, + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "prevPrice", + "type": "t_int64" + }, + { + "label": "prevConf", + "type": "t_uint64" + }, + { + "label": "prevPublishTime", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV2)4503_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV2", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + }, + { + "label": "emaPrice", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + } + ] + }, + "t_int32": { + "label": "int32" + }, + "t_int64": { + "label": "int64" + }, + "t_enum(DeprecatedPriceStatusV1)4445": { + "label": "enum PythDeprecatedStructs.DeprecatedPriceStatusV1", + "members": ["UNKNOWN", "TRADING", "HALTED", "AUCTION"] + }, + "t_struct(DeprecatedPriceV2)4494_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceV2", + "members": [ + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "publishTime", + "type": "t_uint256" + } + ] + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + } + } + } + } + } +} diff --git a/ethereum/.openzeppelin/unknown-42220.json b/ethereum/.openzeppelin/unknown-42220.json new file mode 100644 index 0000000000..7c5de6d86b --- /dev/null +++ b/ethereum/.openzeppelin/unknown-42220.json @@ -0,0 +1,362 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C", + "txHash": "0x8ddfe7fb844bd3b409689e1f44716e72667dacd803c3bc9fc6a36ec5d710cdf6", + "kind": "uups" + } + ], + "impls": { + "fd85319df5664c4344cfee5e5680ccc4a692989c690fefaf0d6f65f782b5459f": { + "address": "0xB2eeb93D778c364E7E2274D6299e2aa0c2Bea090", + "txHash": "0xb7f43a5749bee9b4e56acfbf94137b5788ba9dcb91e60eb31e706bbec41dbac5", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:39" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:44" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "contract": "OwnableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:87" + }, + { + "contract": "ERC1967UpgradeUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "contract": "UUPSUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "contract": "PythState", + "label": "_state", + "type": "t_struct(State)5849_storage", + "src": "../project:/contracts/pyth/PythState.sol:45" + } + ], + "types": { + "t_struct(State)5849_storage": { + "label": "struct PythStorage.State", + "members": [ + { + "label": "wormhole", + "type": "t_address" + }, + { + "label": "_deprecatedPyth2WormholeChainId", + "type": "t_uint16" + }, + { + "label": "_deprecatedPyth2WormholeEmitter", + "type": "t_bytes32" + }, + { + "label": "_deprecatedLatestPriceInfoV1", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)" + }, + { + "label": "validDataSources", + "type": "t_array(t_struct(DataSource)5703_storage)dyn_storage" + }, + { + "label": "isValidDataSource", + "type": "t_mapping(t_bytes32,t_bool)" + }, + { + "label": "singleUpdateFeeInWei", + "type": "t_uint256" + }, + { + "label": "validTimePeriodSeconds", + "type": "t_uint256" + }, + { + "label": "governanceDataSource", + "type": "t_struct(DataSource)5703_storage" + }, + { + "label": "lastExecutedGovernanceSequence", + "type": "t_uint64" + }, + { + "label": "_deprecatedLatestPriceInfoV2", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)" + }, + { + "label": "governanceDataSourceIndex", + "type": "t_uint32" + }, + { + "label": "latestPriceInfo", + "type": "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)" + } + ] + }, + "t_address": { + "label": "address" + }, + "t_uint16": { + "label": "uint16" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV1)" + }, + "t_struct(DeprecatedPriceInfoV1)4485_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV1", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV1)4475_storage" + } + ] + }, + "t_array(t_struct(DataSource)5703_storage)dyn_storage": { + "label": "struct PythInternalStructs.DataSource[]" + }, + "t_struct(DataSource)5703_storage": { + "label": "struct PythInternalStructs.DataSource", + "members": [ + { + "label": "chainId", + "type": "t_uint16" + }, + { + "label": "emitterAddress", + "type": "t_bytes32" + } + ] + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)" + }, + "t_bool": { + "label": "bool" + }, + "t_uint256": { + "label": "uint256" + }, + "t_uint64": { + "label": "uint64" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV2)" + }, + "t_struct(DeprecatedPriceInfoV2)4513_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV2", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV2)4503_storage" + } + ] + }, + "t_uint32": { + "label": "uint32" + }, + "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)": { + "label": "mapping(bytes32 => struct PythInternalStructs.PriceInfo)" + }, + "t_struct(PriceInfo)5698_storage": { + "label": "struct PythInternalStructs.PriceInfo", + "members": [ + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV1)4475_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV1", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "productId", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "status", + "type": "t_enum(DeprecatedPriceStatusV1)4445" + }, + { + "label": "maxNumPublishers", + "type": "t_uint32" + }, + { + "label": "numPublishers", + "type": "t_uint32" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + }, + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "prevPrice", + "type": "t_int64" + }, + { + "label": "prevConf", + "type": "t_uint64" + }, + { + "label": "prevPublishTime", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV2)4503_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV2", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + }, + { + "label": "emaPrice", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + } + ] + }, + "t_int32": { + "label": "int32" + }, + "t_int64": { + "label": "int64" + }, + "t_enum(DeprecatedPriceStatusV1)4445": { + "label": "enum PythDeprecatedStructs.DeprecatedPriceStatusV1", + "members": ["UNKNOWN", "TRADING", "HALTED", "AUCTION"] + }, + "t_struct(DeprecatedPriceV2)4494_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceV2", + "members": [ + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "publishTime", + "type": "t_uint256" + } + ] + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + } + } + } + } + } +} diff --git a/ethereum/.openzeppelin/unknown-44787.json b/ethereum/.openzeppelin/unknown-44787.json new file mode 100644 index 0000000000..e8d1f2f17f --- /dev/null +++ b/ethereum/.openzeppelin/unknown-44787.json @@ -0,0 +1,362 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C", + "txHash": "0x573694c6309a61713653bdce2333a6fa20e564d9a7e5b37b59b211f81ea83aa0", + "kind": "uups" + } + ], + "impls": { + "fd85319df5664c4344cfee5e5680ccc4a692989c690fefaf0d6f65f782b5459f": { + "address": "0xB2eeb93D778c364E7E2274D6299e2aa0c2Bea090", + "txHash": "0x0800dd7ff76db4a57aff7917fe4df330f30e9647a3255c8c0f2c8a046128424c", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:39" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:44" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "contract": "OwnableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:87" + }, + { + "contract": "ERC1967UpgradeUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "contract": "UUPSUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "contract": "PythState", + "label": "_state", + "type": "t_struct(State)5849_storage", + "src": "../project:/contracts/pyth/PythState.sol:45" + } + ], + "types": { + "t_struct(State)5849_storage": { + "label": "struct PythStorage.State", + "members": [ + { + "label": "wormhole", + "type": "t_address" + }, + { + "label": "_deprecatedPyth2WormholeChainId", + "type": "t_uint16" + }, + { + "label": "_deprecatedPyth2WormholeEmitter", + "type": "t_bytes32" + }, + { + "label": "_deprecatedLatestPriceInfoV1", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)" + }, + { + "label": "validDataSources", + "type": "t_array(t_struct(DataSource)5703_storage)dyn_storage" + }, + { + "label": "isValidDataSource", + "type": "t_mapping(t_bytes32,t_bool)" + }, + { + "label": "singleUpdateFeeInWei", + "type": "t_uint256" + }, + { + "label": "validTimePeriodSeconds", + "type": "t_uint256" + }, + { + "label": "governanceDataSource", + "type": "t_struct(DataSource)5703_storage" + }, + { + "label": "lastExecutedGovernanceSequence", + "type": "t_uint64" + }, + { + "label": "_deprecatedLatestPriceInfoV2", + "type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)" + }, + { + "label": "governanceDataSourceIndex", + "type": "t_uint32" + }, + { + "label": "latestPriceInfo", + "type": "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)" + } + ] + }, + "t_address": { + "label": "address" + }, + "t_uint16": { + "label": "uint16" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV1)" + }, + "t_struct(DeprecatedPriceInfoV1)4485_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV1", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV1)4475_storage" + } + ] + }, + "t_array(t_struct(DataSource)5703_storage)dyn_storage": { + "label": "struct PythInternalStructs.DataSource[]" + }, + "t_struct(DataSource)5703_storage": { + "label": "struct PythInternalStructs.DataSource", + "members": [ + { + "label": "chainId", + "type": "t_uint16" + }, + { + "label": "emitterAddress", + "type": "t_bytes32" + } + ] + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)" + }, + "t_bool": { + "label": "bool" + }, + "t_uint256": { + "label": "uint256" + }, + "t_uint64": { + "label": "uint64" + }, + "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)": { + "label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV2)" + }, + "t_struct(DeprecatedPriceInfoV2)4513_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV2", + "members": [ + { + "label": "attestationTime", + "type": "t_uint256" + }, + { + "label": "arrivalTime", + "type": "t_uint256" + }, + { + "label": "arrivalBlock", + "type": "t_uint256" + }, + { + "label": "priceFeed", + "type": "t_struct(DeprecatedPriceFeedV2)4503_storage" + } + ] + }, + "t_uint32": { + "label": "uint32" + }, + "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)": { + "label": "mapping(bytes32 => struct PythInternalStructs.PriceInfo)" + }, + "t_struct(PriceInfo)5698_storage": { + "label": "struct PythInternalStructs.PriceInfo", + "members": [ + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV1)4475_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV1", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "productId", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "status", + "type": "t_enum(DeprecatedPriceStatusV1)4445" + }, + { + "label": "maxNumPublishers", + "type": "t_uint32" + }, + { + "label": "numPublishers", + "type": "t_uint32" + }, + { + "label": "emaPrice", + "type": "t_int64" + }, + { + "label": "emaConf", + "type": "t_uint64" + }, + { + "label": "publishTime", + "type": "t_uint64" + }, + { + "label": "prevPrice", + "type": "t_int64" + }, + { + "label": "prevConf", + "type": "t_uint64" + }, + { + "label": "prevPublishTime", + "type": "t_uint64" + } + ] + }, + "t_struct(DeprecatedPriceFeedV2)4503_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV2", + "members": [ + { + "label": "id", + "type": "t_bytes32" + }, + { + "label": "price", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + }, + { + "label": "emaPrice", + "type": "t_struct(DeprecatedPriceV2)4494_storage" + } + ] + }, + "t_int32": { + "label": "int32" + }, + "t_int64": { + "label": "int64" + }, + "t_enum(DeprecatedPriceStatusV1)4445": { + "label": "enum PythDeprecatedStructs.DeprecatedPriceStatusV1", + "members": ["UNKNOWN", "TRADING", "HALTED", "AUCTION"] + }, + "t_struct(DeprecatedPriceV2)4494_storage": { + "label": "struct PythDeprecatedStructs.DeprecatedPriceV2", + "members": [ + { + "label": "price", + "type": "t_int64" + }, + { + "label": "conf", + "type": "t_uint64" + }, + { + "label": "expo", + "type": "t_int32" + }, + { + "label": "publishTime", + "type": "t_uint256" + } + ] + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + } + } + } + } + } +} diff --git a/ethereum/migrations/prod-receiver/2_deploy_wormhole_receiver.js b/ethereum/migrations/prod-receiver/2_deploy_wormhole_receiver.js index 8b3225c6af..2597b70d65 100644 --- a/ethereum/migrations/prod-receiver/2_deploy_wormhole_receiver.js +++ b/ethereum/migrations/prod-receiver/2_deploy_wormhole_receiver.js @@ -2,6 +2,8 @@ const loadEnv = require("../../scripts/loadEnv"); loadEnv("../../"); const tdr = require("truffle-deploy-registry"); +const governance = require("@pythnetwork/xc-governance-sdk"); +const { assert } = require("chai"); const ReceiverSetup = artifacts.require("ReceiverSetup"); const ReceiverImplementation = artifacts.require("ReceiverImplementation"); @@ -9,7 +11,13 @@ const WormholeReceiver = artifacts.require("WormholeReceiver"); // CONFIG const initialSigners = JSON.parse(process.env.INIT_SIGNERS); -const wormholeReceiverChainId = process.env.WORMHOLE_RECEIVER_CHAIN_ID; + +const chainName = process.env.WORMHOLE_CHAIN_NAME; +assert(chainName !== undefined); + +const wormholeReceiverChainId = governance.CHAINS[chainName]; +assert(wormholeReceiverChainId !== undefined); + const governanceChainId = process.env.INIT_GOV_CHAIN_ID; const governanceContract = process.env.INIT_GOV_CONTRACT; // bytes32 diff --git a/ethereum/migrations/prod-receiver/3_deploy_pyth.js b/ethereum/migrations/prod-receiver/3_deploy_pyth.js index 2abb09a37b..4916980827 100644 --- a/ethereum/migrations/prod-receiver/3_deploy_pyth.js +++ b/ethereum/migrations/prod-receiver/3_deploy_pyth.js @@ -2,10 +2,9 @@ const loadEnv = require("../../scripts/loadEnv"); loadEnv("../../"); const PythUpgradable = artifacts.require("PythUpgradable"); +const WormholeReceiver = artifacts.require("WormholeReceiver"); const { deployProxy } = require("@openzeppelin/truffle-upgrades"); const tdr = require("truffle-deploy-registry"); -const { CONTRACTS } = require("@certusone/wormhole-sdk"); -const { assert } = require("chai"); const emitterChainIds = [ process.env.SOLANA_CHAIN_ID, diff --git a/ethereum/networks/25.json b/ethereum/networks/25.json new file mode 100644 index 0000000000..bc0d4f6851 --- /dev/null +++ b/ethereum/networks/25.json @@ -0,0 +1,16 @@ +[ + { + "contractName": "Migrations", + "address": "0x1c6Cd107fB71768FBc46F8B6180Eec155C03eEb5" + }, + { + "contractName": "WormholeReceiver", + "address": "0x939C0e902FF5B3F7BA666Cc8F6aC75EE76d3f900", + "transactionHash": "0x698d0216ca776a4f773bdadfa7ad7727116bf6c218ca37829c7c40b936a51323" + }, + { + "contractName": "PythUpgradable", + "address": "0xE0d0e68297772Dd5a1f1D99897c581E2082dbA5B", + "transactionHash": "0x229f14684a49c10c4184009bfcf7a324e8f7ec0211deee51899c8afdeaa37fe5" + } +] diff --git a/ethereum/networks/321.json b/ethereum/networks/321.json new file mode 100644 index 0000000000..56b13d2304 --- /dev/null +++ b/ethereum/networks/321.json @@ -0,0 +1,16 @@ +[ + { + "contractName": "Migrations", + "address": "0x1c6Cd107fB71768FBc46F8B6180Eec155C03eEb5" + }, + { + "contractName": "WormholeReceiver", + "address": "0x4305FB66699C3B2702D4d05CF36551390A4c69C6", + "transactionHash": "0xbac763ee666a66e61597cc4e356b731fe9caa7165d76edcb797432da47dc8454" + }, + { + "contractName": "PythUpgradable", + "address": "0xE0d0e68297772Dd5a1f1D99897c581E2082dbA5B", + "transactionHash": "0xba07e137830ee2ab629e480f32f6a3e751e75fe2dd4bc2f59854820129485668" + } +] diff --git a/ethereum/networks/322.json b/ethereum/networks/322.json new file mode 100644 index 0000000000..2d7dafd7cf --- /dev/null +++ b/ethereum/networks/322.json @@ -0,0 +1,16 @@ +[ + { + "contractName": "Migrations", + "address": "0x1c6Cd107fB71768FBc46F8B6180Eec155C03eEb5" + }, + { + "contractName": "WormholeReceiver", + "address": "0x4305FB66699C3B2702D4d05CF36551390A4c69C6", + "transactionHash": "0xf7568279c184e5cfacb3e837759e096133731cdbfe601ef207951d378ee81e7b" + }, + { + "contractName": "PythUpgradable", + "address": "0x15D35b8985e350f783fe3d95401401E194ff1E6f", + "transactionHash": "0xfb01e67fb897d60854eaabfe1f7c1b5f9c773be5be62cc6f976a58fc8133980d" + } +] diff --git a/ethereum/networks/338.json b/ethereum/networks/338.json new file mode 100644 index 0000000000..b9765a6466 --- /dev/null +++ b/ethereum/networks/338.json @@ -0,0 +1,16 @@ +[ + { + "contractName": "Migrations", + "address": "0x1c6Cd107fB71768FBc46F8B6180Eec155C03eEb5" + }, + { + "contractName": "WormholeReceiver", + "address": "0x15D35b8985e350f783fe3d95401401E194ff1E6f", + "transactionHash": "0x1c33d9b6971f7337e0e2ea390affe18fe90709dcb803712f6d8bb4a008705fb7" + }, + { + "contractName": "PythUpgradable", + "address": "0xBAEA4A1A2Eaa4E9bb78f2303C213Da152933170E", + "transactionHash": "0x507d747b3c978794cc880a201c009d37367f66925b930c0cebc30c493c9d31eb" + } +] diff --git a/ethereum/networks/42220.json b/ethereum/networks/42220.json new file mode 100644 index 0000000000..4eb76958f3 --- /dev/null +++ b/ethereum/networks/42220.json @@ -0,0 +1,11 @@ +[ + { + "contractName": "Migrations", + "address": "0x1c6Cd107fB71768FBc46F8B6180Eec155C03eEb5" + }, + { + "contractName": "PythUpgradable", + "address": "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C", + "transactionHash": "0x8ddfe7fb844bd3b409689e1f44716e72667dacd803c3bc9fc6a36ec5d710cdf6" + } +] diff --git a/ethereum/networks/44787.json b/ethereum/networks/44787.json new file mode 100644 index 0000000000..6f9ead8872 --- /dev/null +++ b/ethereum/networks/44787.json @@ -0,0 +1,11 @@ +[ + { + "contractName": "Migrations", + "address": "0x1c6Cd107fB71768FBc46F8B6180Eec155C03eEb5" + }, + { + "contractName": "PythUpgradable", + "address": "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C", + "transactionHash": "0x573694c6309a61713653bdce2333a6fa20e564d9a7e5b37b59b211f81ea83aa0" + } +] diff --git a/ethereum/scripts/receiverSubmitGuardianSetUpgrades.js b/ethereum/scripts/receiverSubmitGuardianSetUpgrades.js index 686f33d049..ac7c45c925 100644 --- a/ethereum/scripts/receiverSubmitGuardianSetUpgrades.js +++ b/ethereum/scripts/receiverSubmitGuardianSetUpgrades.js @@ -3,7 +3,7 @@ const jsonfile = require("jsonfile"); const WormholeReceiver = artifacts.require("WormholeReceiver"); const WormholeReceiverImplementationFullABI = jsonfile.readFileSync( - "../build/contracts/wormhole-receiver/ReceiverImplementation.json" + "../build/contracts/ReceiverImplementation.json" ).abi; const GUARDIAN_SET_UPGRADE_1_VAA = diff --git a/ethereum/truffle-config.js b/ethereum/truffle-config.js index c8342417f2..eeb647dcf8 100644 --- a/ethereum/truffle-config.js +++ b/ethereum/truffle-config.js @@ -225,6 +225,60 @@ module.exports = { }, network_id: 44787, }, + kcc: { + provider: () => { + return new HDWalletProvider( + process.env.MNEMONIC, + "https://rpc-mainnet.kcc.network" + ); + }, + network_id: 321, + }, + kcc_testnet: { + provider: () => { + return new HDWalletProvider( + process.env.MNEMONIC, + "https://rpc-testnet.kcc.network" + ); + }, + network_id: 322, + }, + zksync: { + provider: () => { + return new HDWalletProvider( + process.env.MNEMONIC, + "https://zksync2-mainnet.zksync.io" + ); + }, + network_id: 324, + }, + zksync_testnet: { + provider: () => { + return new HDWalletProvider( + process.env.MNEMONIC, + "https://zksync2-testnet.zksync.dev" + ); + }, + network_id: 280, + }, + cronos: { + provider: () => { + return new HDWalletProvider( + process.env.MNEMONIC, + "https://cronosrpc-1.xstaking.sg" + ); + }, + network_id: 25, + }, + cronos_testnet: { + provider: () => { + return new HDWalletProvider( + process.env.MNEMONIC, + "https://evm-t3.cronos.org" + ); + }, + network_id: 338, + }, }, compilers: { diff --git a/third_party/pyth/xc-governance-sdk-js/src/chains.ts b/third_party/pyth/xc-governance-sdk-js/src/chains.ts new file mode 100644 index 0000000000..65aa5bca61 --- /dev/null +++ b/third_party/pyth/xc-governance-sdk-js/src/chains.ts @@ -0,0 +1,13 @@ +import { CHAINS as WORMHOLE_CHAINS } from "@certusone/wormhole-sdk"; + +const RECEIVER_CHAINS = { + cronos: 60001, + kcc: 60002, + zksync: 60003, +}; + +// If there is any overlapping value the receiver chain will replace the wormhole +// value and that is an expected behavior. +export const CHAINS = { ...WORMHOLE_CHAINS, ...RECEIVER_CHAINS }; +export declare type ChainName = keyof typeof CHAINS; +export declare type ChainId = typeof CHAINS[ChainName]; diff --git a/third_party/pyth/xc-governance-sdk-js/src/index.ts b/third_party/pyth/xc-governance-sdk-js/src/index.ts index bf215a5618..07dc8f5a3b 100644 --- a/third_party/pyth/xc-governance-sdk-js/src/index.ts +++ b/third_party/pyth/xc-governance-sdk-js/src/index.ts @@ -12,4 +12,4 @@ export { Instruction, } from "./instructions"; -export { CHAINS, ChainId } from "@certusone/wormhole-sdk"; +export { CHAINS, ChainId, ChainName } from "./chains"; diff --git a/third_party/pyth/xc-governance-sdk-js/src/instructions.ts b/third_party/pyth/xc-governance-sdk-js/src/instructions.ts index 53714a04a5..e60ced4857 100644 --- a/third_party/pyth/xc-governance-sdk-js/src/instructions.ts +++ b/third_party/pyth/xc-governance-sdk-js/src/instructions.ts @@ -1,4 +1,4 @@ -import { ChainId, CHAINS } from "@certusone/wormhole-sdk"; +import { ChainId } from "./chains"; import { Serializable, BufferBuilder } from "./serialize";