Skip to content

Commit

Permalink
chore(ethereum): add new networks (#1288)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ali-bahjati authored Feb 9, 2024
1 parent 6771c2c commit 99f6dd9
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 6 deletions.
15 changes: 15 additions & 0 deletions contract_manager/store/chains/EvmChains.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 15 additions & 3 deletions contract_manager/store/contracts/EvmPriceFeedContracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 changes: 3 additions & 0 deletions governance/xc_admin/packages/xc_admin_common/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions target_chains/ethereum/sdk/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
2 changes: 1 addition & 1 deletion target_chains/ethereum/sdk/js/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 5 additions & 1 deletion target_chains/ethereum/sdk/js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 99f6dd9

Please sign in to comment.