Skip to content

Commit

Permalink
Add Berachain Bartio
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana Stemkovski committed Sep 2, 2024
1 parent fa7eda9 commit f6f1843
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 @@ -16,6 +16,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId:
return `avalanche_${tokenName}` as TokenTableName
case ChainId.Base:
return `base_${tokenName}` as TokenTableName
case ChainId.Berachain_bArtio:
return `berachain_bartio_${tokenName}` as TokenTableName
case ChainId.Blast:
return `blast_${tokenName}` as TokenTableName
case ChainId.Bsc:
Expand Down
18 changes: 18 additions & 0 deletions src/crypto/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export enum ChainId {
Arthera = 10242,
Avalanche = 43114,
Base = 8453,
Berachain_bArtio = 80084,
Blast = 81457,
Bsc = 56,
Celo = 42220,
Expand Down Expand Up @@ -201,6 +202,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = {
}
}
},
[ChainId.Berachain_bArtio]: {
chainId: ChainId.Berachain_bArtio,
name: 'Berachain bArtio',
color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)',
icon: generateIconUrl(ChainId.Berachain_bArtio, 'svg'),
env: 'mainnet',
scanLink: 'https://bartio.beratrail.io',
scanName: 'Bartio Testnet Explorer',
coingecko: '',
rpc: {
rpcUrl: 'https://bartio.rpc.berachain.com',
nativeCurrency: {
symbol: 'BERA',
name: 'BERA'
}
}
},
[ChainId.Blast]: {
chainId: ChainId.Blast,
name: 'Blast',
Expand Down
7 changes: 7 additions & 0 deletions src/crypto/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ export const providerCacheReference: Record<ChainId, ProviderCache> = {
cacheHit: 0,
cacheMiss: 0
},
[ChainId.Berachain_bArtio]: {
lastUdated: 0,
cacheHit: 0,
cacheMiss: 0
},
[ChainId.Blast]: {
lastUdated: 0,
cacheHit: 0,
Expand Down Expand Up @@ -264,6 +269,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => {
return EnvUtils.EnvName.ARTHERA_RPC_HOSTS;
case ChainId.Base:
return EnvUtils.EnvName.BASE_RPC_HOSTS;
case ChainId.Berachain_bArtio:
return EnvUtils.EnvName.BERACHAIN_BARTIO_RPC_HOSTS;
case ChainId.Blast:
return EnvUtils.EnvName.BLAST_RPC_HOSTS;
case ChainId.Bsc:
Expand Down
2 changes: 2 additions & 0 deletions src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export namespace EnvUtils {
GOERLI_RPC_HOSTS = 'GOERLI_RPC_HOSTS',
ARTHERA_RPC_HOSTS = 'ARTHERA_RPC_HOSTS',
BASE_RPC_HOSTS = 'BASE_RPC_HOSTS',
BERACHAIN_BARTIO_RPC_HOSTS = 'BERACHAIN_BARTIO_RPC_HOSTS',
BLAST_RPC_HOSTS = 'BLAST_RPC_HOSTS',
BSC_RPC_HOSTS = 'BSC_RPC_HOSTS',
CELO_RPC_HOSTS = 'CELO_RPC_HOSTS',
Expand Down Expand Up @@ -45,6 +46,7 @@ export namespace EnvUtils {
GATSBY_GOERLI_RPC_HOSTS = 'GATSBY_GOERLI_RPC_HOSTS',
GATSBY_ARTHERA_RPC_HOSTS = 'GATSBY_ARTHERA_RPC_HOSTS',
GATSBY_BASE_RPC_HOSTS = 'GATSBY_BASE_RPC_HOSTS',
GATSBY_BERACHAIN_BARTIO_RPC_HOSTS = 'GATSBY_BERACHAIN_BARTIO_RPC_HOSTS',
GATSBY_BLAST_RPC_HOSTS = 'GATSBY_BLAST_RPC_HOSTS',
GATSBY_BSC_RPC_HOSTS = 'GATSBY_BSC_RPC_HOSTS',
GATSBY_CELO_RPC_HOSTS = 'GATSBY_CELO_RPC_HOSTS',
Expand Down

0 comments on commit f6f1843

Please sign in to comment.