Prechádzať zdrojové kódy

chore(ethereum): add new networks (#1288)

This change adds the configuration of the following new networks:
- Hedera new testnet and mainnet
- Injective inEVM tesntet and mainnet
- IDEX xChain testnet

It also updates the ethereum sdk README to outline Hedera special
behaviour around update fees.
Ali Behjati 1 rok pred
rodič
commit
99f6dd99fc

+ 15 - 0
contract_manager/store/chains/EvmChains.yaml

@@ -458,3 +458,18 @@
   rpcUrl: https://sepolia-dela.deperp.com
   networkId: 9393
   type: EvmChain
+- id: idex_xchain_testnet
+  mainnet: false
+  rpcUrl: https://xchain-testnet-rpc.idex.io
+  networkId: 671276500
+  type: EvmChain
+- id: injective_inevm_testnet
+  mainnet: false
+  rpcUrl: https://inevm-testnet.rpc.caldera.xyz/http
+  networkId: 2424
+  type: EvmChain
+- id: injective_inevm
+  mainnet: true
+  rpcUrl: https://inevm.calderachain.xyz/http
+  networkId: 2525
+  type: EvmChain

+ 15 - 3
contract_manager/store/contracts/EvmPriceFeedContracts.yaml

@@ -253,9 +253,6 @@
 - chain: zetachain
   address: "0x2880aB155794e7179c9eE2e38200202908C17B43"
   type: EvmPriceFeedContract
-- chain: hedera_testnet
-  address: "0x7a7F2493c578796ABfBA15Ce2e914A7A819979B7"
-  type: EvmPriceFeedContract
 - chain: sei_evm_devnet
   address: "0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509"
   type: EvmPriceFeedContract
@@ -271,3 +268,18 @@
 - chain: lightlink_phoenix
   address: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"
   type: EvmPriceFeedContract
+- chain: idex_xchain_testnet
+  address: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"
+  type: EvmPriceFeedContract
+- chain: injective_inevm_testnet
+  address: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"
+  type: EvmPriceFeedContract
+- chain: injective_inevm
+  address: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"
+  type: EvmPriceFeedContract
+- chain: hedera_testnet
+  address: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"
+  type: EvmPriceFeedContract
+- chain: hedera
+  address: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"
+  type: EvmPriceFeedContract

+ 3 - 0
governance/xc_admin/packages/xc_admin_common/src/chains.ts

@@ -61,6 +61,7 @@ export const RECEIVER_CHAINS = {
   hedera: 60042,
   filecoin: 60043,
   lightlink_phoenix: 60044,
+  injective_inevm: 60045,
 
   // Testnets as a separate chain ids (to use stable data sources and governance for them)
   injective_testnet: 60013,
@@ -123,6 +124,8 @@ export const RECEIVER_CHAINS = {
   sei_evm_devnet: 50051,
   fantom_sonic_testnet: 50052,
   dela_deperp_testnet: 50053,
+  injective_inevm_testnet: 50054,
+  idex_xchain_testnet: 50055,
 };
 
 // If there is any overlapping value the receiver chain will replace the wormhole

+ 1 - 1
package-lock.json

@@ -59418,7 +59418,7 @@
     },
     "target_chains/ethereum/sdk/js": {
       "name": "@pythnetwork/pyth-evm-js",
-      "version": "1.30.0",
+      "version": "1.31.0",
       "license": "Apache-2.0",
       "dependencies": {
         "@pythnetwork/price-service-client": "*",

+ 3 - 0
target_chains/ethereum/sdk/js/README.md

@@ -48,8 +48,11 @@ const priceUpdateData = await connection.getPriceFeedsUpdateData(priceIds);
 const updateFee = await pythContract.methods
   .getUpdateFee(priceUpdateData)
   .call();
+
 // Calling someContract method
 // `someContract` below is a web3.js contract; if you wish to use ethers, you need to change it accordingly.
+// Note: In Hedera you need to pass updateFee * 10^10 as value to the send method as there is an
+// inconsistency in the way the value is handled in Hedera RPC and the way it is handled on-chain.
 await someContract.methods
   .doSomething(someArg, otherArg, priceUpdateData)
   .send({ value: updateFee });

+ 1 - 1
target_chains/ethereum/sdk/js/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@pythnetwork/pyth-evm-js",
-  "version": "1.30.0",
+  "version": "1.31.0",
   "description": "Pyth Network EVM Utils in JS",
   "homepage": "https://pyth.network",
   "author": {

+ 5 - 1
target_chains/ethereum/sdk/js/src/index.ts

@@ -30,7 +30,9 @@ export const CONTRACT_ADDR: Record<string, string> = {
   fantom: "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C",
   filecoin: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
   gnosis: "0x2880aB155794e7179c9eE2e38200202908C17B43",
+  hedera: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
   horizen_eon: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
+  injective_inevm: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
   kava: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
   lightlink: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
   linea: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
@@ -74,7 +76,9 @@ export const CONTRACT_ADDR: Record<string, string> = {
   fantom_testnet: "0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb",
   filecoin_calibration: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
   fuji: "0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509",
-  hedera_testnet: "0x7a7F2493c578796ABfBA15Ce2e914A7A819979B7",
+  hedera_testnet: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
+  idex_xchain_testnet: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
+  injective_inevm_testnet: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
   kcc_testnet: "0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E",
   kava_testnet: "0xfA25E653b44586dBbe27eE9d252192F0e4956683",
   lightlink_pegasus_testnet: "0x5D289Ad1CE59fCC25b6892e7A303dfFf3a9f7167",