ghost-dao-interface/src/constants.ts
Uncle Fatso 7cf8ebcf0b
governance exists on all chains
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
2026-04-12 11:58:09 +03:00

70 lines
1.4 KiB
TypeScript

export enum NetworkId {
TESTNET_SEPOLIA = 11155111,
TESTNET_HOODI = 560048,
TESTNET_MORDOR = 63,
}
export const isNetworkAvailable = (chainId, addressChainId) => {
chainId = addressChainId ? addressChainId : chainId;
let exists = false;
switch (chainId) {
case 11155111:
exists = true
break;
case 560048:
exists = true
break;
case 63:
exists = true
break;
default:
break;
}
return exists;
}
export const isNetworkLegacy = (chainId) => {
let isLegacy = false;
switch (chainId) {
case 11155111:
isLegacy = true
break;
case 63:
isLegacy = true
break;
default:
break;
}
return isLegacy;
}
export const isNetworkLegacyType = (chainId) => {
let isLegacyType = false;
switch (chainId) {
case 63:
isLegacyType = true;
break;
default:
break;
}
return isLegacyType
}
export const networkAvgBlockSpeed = (chainId) => {
let blockSpeed = 12n;
switch (chainId) {
case 11155111:
blockSpeed = 12n
break;
case 560048:
blockSpeed = 12n
break;
case 63:
blockSpeed = 13n
break;
default:
break;
}
return blockSpeed
}