Skip to content

Commit

Permalink
feat(hedera): added support for hedera network (#880)
Browse files Browse the repository at this point in the history
* feat(hedera): added support for hedera network

* feat(hedera): added support for hedera network

* feat(hedera): added support for hedera network
  • Loading branch information
AnithaKrypC authored Feb 28, 2024
1 parent 14a107b commit 3e77817
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
Binary file added public/static/images/networks/hedera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion src/config/chain-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ export const MAIN_NETWORKS = [
ChainId.Ethereum, //
ChainId.Polygon,
ChainId.XDC,
ChainId.HederaMainnet,
];

/**
* Supported networks in development environment
*/
export const TEST_NETWORKS = [ChainId.Sepolia, ChainId.PolygonMumbai, ChainId.APOTHEM, ChainId.StabilityTestnet];
export const TEST_NETWORKS = [
ChainId.Sepolia,
ChainId.PolygonMumbai,
ChainId.APOTHEM,
ChainId.StabilityTestnet,
ChainId.HederaTestnet,
];
34 changes: 33 additions & 1 deletion src/constants/chain-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface ChainInfoObject {
export const InitialAddress = "0x0000000000000000000000000000000000000000";
export const BurnAddress = "0x000000000000000000000000000000000000dEaD";

export const AvailableBlockChains = ["ETH", "MATIC", "XDC"];
export const AvailableBlockChains = ["ETH", "MATIC", "XDC", "HBAR"];

type ChainInfo = Record<ChainId, ChainInfoObject>;

Expand All @@ -42,6 +42,10 @@ export enum ChainId {

// Stability
StabilityTestnet = 20180427,

//Hedera Network
HederaMainnet = 295,
HederaTestnet = 296,
}

export const ChainInfo: ChainInfo = {
Expand Down Expand Up @@ -146,4 +150,32 @@ export const ChainInfo: ChainInfo = {
decimals: 18,
},
},
[ChainId.HederaMainnet]: {
label: "Hedera Mainnet",
chainId: ChainId.HederaMainnet,
iconImage: "/static/images/networks/hedera.png",
networkName: "hederamainnet",
networkLabel: "Hedera Mainnet",
explorerUrl: "https://hashscan.io/mainnet",
rpcUrl: "https://mainnet.hashio.io/api",
nativeCurrency: {
name: "HBAR",
symbol: "HBAR",
decimals: 18,
},
},
[ChainId.HederaTestnet]: {
label: "Hedera Testnet",
chainId: ChainId.HederaTestnet,
iconImage: "/static/images/networks/hedera.png",
networkName: "hederatestnet",
networkLabel: "Hedera Testnet",
explorerUrl: "https://hashscan.io/testnet",
rpcUrl: "https://testnet.hashio.io/api",
nativeCurrency: {
name: "HBAR",
symbol: "HBAR",
decimals: 18,
},
},
};

0 comments on commit 3e77817

Please sign in to comment.