From e082f766fbbab25675e52ad20e119b659d3eb3c8 Mon Sep 17 00:00:00 2001 From: Ali Behjati Date: Wed, 20 Nov 2024 20:48:55 +0100 Subject: [PATCH] chore(target_chains/ethereum): add new networks --- contract_manager/store/chains/EvmChains.yaml | 26 ++++++++++++++++--- .../store/contracts/EvmEntropyContracts.yaml | 6 +++++ .../contracts/EvmPriceFeedContracts.yaml | 9 +++++++ .../store/contracts/EvmWormholeContracts.yaml | 9 +++++++ .../packages/xc_admin_common/src/chains.ts | 5 ++++ .../contracts/deploy/zkSyncDeployEntropy.ts | 5 ++-- .../contracts/deploy/zkSyncDeployPriceFeed.ts | 4 +-- .../ethereum/contracts/hardhat.config.ts | 8 +++++- 8 files changed, 64 insertions(+), 8 deletions(-) diff --git a/contract_manager/store/chains/EvmChains.yaml b/contract_manager/store/chains/EvmChains.yaml index cf7b7628e..00985d046 100644 --- a/contract_manager/store/chains/EvmChains.yaml +++ b/contract_manager/store/chains/EvmChains.yaml @@ -757,7 +757,7 @@ type: EvmChain - id: kraken_ink_testnet mainnet: false - rpcUrl: https://patient-cool-emerald.ink-sepolia.quiknode.pro/{KRAKEN_INK_API_KEY} + rpcUrl: https://patient-cool-emerald.ink-sepolia.quiknode.pro/$ENV_KRAKEN_INK_API_KEY networkId: 763373 type: EvmChain - id: ethena_testnet @@ -767,12 +767,12 @@ type: EvmChain - id: superseed_mainnet mainnet: true - rpcUrl: https://rpc-superseed-mainnet-0.t.conduit.xyz/{SUPERSEED_API_KEY} + rpcUrl: https://rpc-superseed-mainnet-0.t.conduit.xyz/$ENV_SUPERSEED_API_KEY networkId: 5330 type: EvmChain - id: superseed_testnet mainnet: false - rpcUrl: https://rpc-sepolia-superseed-826s35710w.t.conduit.xyz/{SUPERSEED_API_KEY} + rpcUrl: https://rpc-sepolia-superseed-826s35710w.t.conduit.xyz/$ENV_SUPERSEED_API_KEY networkId: 53302 type: EvmChain - id: hemi_mainnet @@ -780,3 +780,23 @@ rpcUrl: https://7e57304f.rpc.hemi.network/rpc networkId: 43111 type: EvmChain +- id: hyperevm_testnet + mainnet: false + rpcUrl: https://api.hyperliquid-testnet.xyz/evm + networkId: 998 + type: EvmChain +- id: happy_bird_song_ends_with_tio + mainnet: false + rpcUrl: https://happy_bird_song_ends_with_tio.com + networkId: 80000 + type: EvmChain +- id: horse_dream + mainnet: true + rpcUrl: https://redacted.quiknode.pro/$ENV_UNICHAIN_API_KEY + networkId: 130 + type: EvmChain +- id: mathematician_in_heart + mainnet: true + rpcUrl: https://redacted.master.dev/ + networkId: 2741 + type: EvmChain diff --git a/contract_manager/store/contracts/EvmEntropyContracts.yaml b/contract_manager/store/contracts/EvmEntropyContracts.yaml index 4f423ddc2..c7a13e639 100644 --- a/contract_manager/store/contracts/EvmEntropyContracts.yaml +++ b/contract_manager/store/contracts/EvmEntropyContracts.yaml @@ -115,3 +115,9 @@ - chain: abstract_testnet address: "0x858687fD592112f7046E394A3Bf10D0C11fF9e63" type: EvmEntropyContract +- chain: horse_dream + address: "0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320" + type: EvmEntropyContract +- chain: mathematician_in_heart + address: "0x5a4a369F4db5df2054994AF031b7b23949b98c0e" + type: EvmEntropyContract diff --git a/contract_manager/store/contracts/EvmPriceFeedContracts.yaml b/contract_manager/store/contracts/EvmPriceFeedContracts.yaml index 4edaaa14b..04d2e0942 100644 --- a/contract_manager/store/contracts/EvmPriceFeedContracts.yaml +++ b/contract_manager/store/contracts/EvmPriceFeedContracts.yaml @@ -430,3 +430,12 @@ - chain: tabi_testnet address: "0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb" type: EvmPriceFeedContract +- chain: hyperevm_testnet + address: "0x2880aB155794e7179c9eE2e38200202908C17B43" + type: EvmPriceFeedContract +- chain: horse_dream + address: "0x2880aB155794e7179c9eE2e38200202908C17B43" + type: EvmPriceFeedContract +- chain: mathematician_in_heart + address: "0x8739d5024B5143278E2b15Bd9e7C26f6CEc658F1" + type: EvmPriceFeedContract diff --git a/contract_manager/store/contracts/EvmWormholeContracts.yaml b/contract_manager/store/contracts/EvmWormholeContracts.yaml index 0152a0e47..cad9209c6 100644 --- a/contract_manager/store/contracts/EvmWormholeContracts.yaml +++ b/contract_manager/store/contracts/EvmWormholeContracts.yaml @@ -424,3 +424,12 @@ - chain: tabi_testnet address: "0x35a58BeeE77a2Ad547FcDed7e8CB1c6e19746b13" type: EvmWormholeContract +- chain: hyperevm_testnet + address: "0xb27e5ca259702f209a29225d0eDdC131039C9933" + type: EvmWormholeContract +- chain: horse_dream + address: "0xb27e5ca259702f209a29225d0eDdC131039C9933" + type: EvmWormholeContract +- chain: mathematician_in_heart + address: "0x056f829183Ec806A78c26C98961678c24faB71af" + type: EvmWormholeContract diff --git a/governance/xc_admin/packages/xc_admin_common/src/chains.ts b/governance/xc_admin/packages/xc_admin_common/src/chains.ts index 988af22b2..aaac1edeb 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/chains.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/chains.ts @@ -96,6 +96,9 @@ export const RECEIVER_CHAINS = { fuel_mainnet: 60067, // Note: Currently deployed at 50084 (fuel_testnet) but we should use 60067 for future deployments hemi_mainnet: 60068, ton_mainnet: 60069, + horse_dream: 60070, + mathematician_in_heart: 60071, + // Testnets as a separate chain ids (to use stable data sources and governance for them) injective_testnet: 60013, osmosis_testnet_4: 60015, @@ -209,6 +212,8 @@ export const RECEIVER_CHAINS = { kraken_ink_testnet: 50105, ethena_testnet: 50106, superseed_testnet: 50107, + happy_bird_song_ends_with_tio: 50108, + hyperevm_testnet: 50109, }; // If there is any overlapping value the receiver chain will replace the wormhole diff --git a/target_chains/ethereum/contracts/deploy/zkSyncDeployEntropy.ts b/target_chains/ethereum/contracts/deploy/zkSyncDeployEntropy.ts index 3212669d9..f0eb9d892 100644 --- a/target_chains/ethereum/contracts/deploy/zkSyncDeployEntropy.ts +++ b/target_chains/ethereum/contracts/deploy/zkSyncDeployEntropy.ts @@ -43,8 +43,8 @@ export default async function (hre: HardhatRuntimeEnvironment) { wormholeInitialSigners, governanceEmitter, governanceChainId, - chainName, } = getDefaultConfig(envOrErr("MIGRATIONS_NETWORK")); + const chainName = envOrErr("MIGRATIONS_NETWORK"); const wormholeReceiverChainId = CHAINS[chainName]; assert(wormholeReceiverChainId !== undefined); @@ -90,7 +90,8 @@ export default async function (hre: HardhatRuntimeEnvironment) { console.log("Entropy contract address:", entropyContractAddress); console.log("Saving the contract in the store..."); - const contract = new EvmEntropyContract(chainName, entropyContractAddress); + const chain = DefaultStore.chains[chainName]; + const contract = new EvmEntropyContract(chain, entropyContractAddress); DefaultStore.entropy_contracts[contract.getId()] = contract; DefaultStore.saveAllContracts(); } diff --git a/target_chains/ethereum/contracts/deploy/zkSyncDeployPriceFeed.ts b/target_chains/ethereum/contracts/deploy/zkSyncDeployPriceFeed.ts index 430a26b3d..52afcb1cb 100644 --- a/target_chains/ethereum/contracts/deploy/zkSyncDeployPriceFeed.ts +++ b/target_chains/ethereum/contracts/deploy/zkSyncDeployPriceFeed.ts @@ -64,10 +64,10 @@ export default async function (hre: HardhatRuntimeEnvironment) { wormholeReceiverContractAddress = await deployWormholeContract( deployer, chainName, - wormholeReceiverChainId, wormholeGovernanceChainId, wormholeGovernanceContract, - wormholeInitialSigners + wormholeInitialSigners, + wormholeReceiverChainId ); } diff --git a/target_chains/ethereum/contracts/hardhat.config.ts b/target_chains/ethereum/contracts/hardhat.config.ts index 1fa7efe73..baf60b668 100644 --- a/target_chains/ethereum/contracts/hardhat.config.ts +++ b/target_chains/ethereum/contracts/hardhat.config.ts @@ -15,7 +15,7 @@ module.exports = { }, }, }, - defaultNetwork: "abstractTestnet", + defaultNetwork: "mathMainnet", networks: { // [process.env.MIGRATIONS_NETWORK!]: { // url: process.env.RPC_URL, @@ -60,6 +60,12 @@ module.exports = { verifyURL: "https://api-explorer-verify.testnet.abs.xyz/contract_verification", }, + mathMainnet: { + url: "https://redacted.master.dev/", + ethNetwork: "mainnet", + zksync: true, + verifyURL: "https://redacted.master.dev/contract_verification", + }, }, etherscan: { apiKey: {