Skip to content

Commit

Permalink
Add Kava
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana Stemkovski committed Apr 5, 2024
1 parent b336cc3 commit e2a925a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId:
return `fantom_${tokenName}` as TokenTableName
case ChainId.Hedera:
return `hedera_${tokenName}` as TokenTableName
case ChainId.Kava:
return `kava_${tokenName}` as TokenTableName
case ChainId.Linea:
return `linea_${tokenName}` as TokenTableName
case ChainId.Mantle:
Expand Down
18 changes: 18 additions & 0 deletions src/crypto/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export enum ChainId {
Linea = 59144,
opBNB = 204,
zkEVM = 1101,
Kava = 2222,
}

export interface IAssetData {
Expand Down Expand Up @@ -296,6 +297,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = {
}
}
},
[ChainId.Kava]: {
chainId: ChainId.Kava,
name: 'Kava',
color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)',
icon: generateIconUrl(ChainId.Kava, 'svg'),
env: 'mainnet',
scanLink: 'https://kavascan.com/',
scanName: 'KavaScan',
coingecko: 'kava',
rpc: {
rpcUrl: 'https://evm.kava.io',
nativeCurrency: {
symbol: 'KAVA',
name: 'KAVA'
}
}
},
[ChainId.Linea]: {
chainId: ChainId.Linea,
name: 'Linea',
Expand Down
7 changes: 7 additions & 0 deletions src/crypto/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ export const providerCacheReference: Record<ChainId, ProviderCache> = {
cacheHit: 0,
cacheMiss: 0
},
[ChainId.Kava]: {
lastUdated: 0,
cacheHit: 0,
cacheMiss: 0
},
[ChainId.Linea]: {
lastUdated: 0,
cacheHit: 0,
Expand Down Expand Up @@ -236,6 +241,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => {
return EnvUtils.EnvName.FANTOM_RPC_HOSTS;
case ChainId.Hedera:
return EnvUtils.EnvName.HEDERA_RPC_HOSTS;
case ChainId.Kava:
return EnvUtils.EnvName.KAVA_RPC_HOSTS;
case ChainId.Linea:
return EnvUtils.EnvName.LINEA_RPC_HOSTS;
case ChainId.Mantle:
Expand Down
2 changes: 2 additions & 0 deletions src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export namespace EnvUtils {
EVMOS_RPC_HOSTS = 'EVMOS_RPC_HOSTS',
FANTOM_RPC_HOSTS = 'FANTOM_RPC_HOSTS',
HEDERA_RPC_HOSTS = 'HEDERA_RPC_HOSTS',
KAVA_RPC_HOSTS = 'KAVA_RPC_HOSTS',
LINEA_RPC_HOSTS = 'LINEA_RPC_HOSTS',
MANTLE_RPC_HOSTS = 'MANTLE_RPC_HOSTS',
OPBNB_RPC_HOSTS = 'OPBNB_RPC_HOSTS',
Expand Down Expand Up @@ -43,6 +44,7 @@ export namespace EnvUtils {
GATSBY_EVMOS_RPC_HOSTS = 'GATSBY_EVMOS_RPC_HOSTS',
GATSBY_FANTOM_RPC_HOSTS = 'GATSBY_FANTOM_RPC_HOSTS',
GATSBY_HEDERA_RPC_HOSTS = 'GATSBY_HEDERA_RPC_HOSTS',
GATSBY_KAVA_RPC_HOSTS = 'GATSBY_KAVA_RPC_HOSTS',
GATSBY_LINEA_RPC_HOSTS = 'GATSBY_LINEA_RPC_HOSTS',
GATSBY_MANTLE_RPC_HOSTS = 'GATSBY_MANTLE_RPC_HOSTS',
GATSBY_OPBNB_RPC_HOSTS = 'GATSBY_OPBNB_RPC_HOSTS',
Expand Down

0 comments on commit e2a925a

Please sign in to comment.