Skip to content

Commit

Permalink
Add blast
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana Stemkovski committed Apr 3, 2024
1 parent 6c8a143 commit a45a23d
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId:
return `avalanche_${tokenName}` as TokenTableName
case ChainId.Base:
return `base_${tokenName}` as TokenTableName
case ChainId.Blast:
return `blast_${tokenName}` as TokenTableName
case ChainId.Bsc:
return `bsc_${tokenName}` as TokenTableName
case ChainId.Celo:
Expand Down Expand Up @@ -2107,6 +2109,19 @@ export const TOKENS: TokenMapping = {
atCoingecko: true
}
},
[TokenName.USDB]: {
[ChainId.Blast]: {
tokenName: TokenName.USDB,
tableName: tokenNameWithChainPrefix(TokenName.USDB, ChainId.Blast),
address: '0x4300000000000000000000000000000000000003',
decimals: 18,
displayName: 'USDB',
symbol: 'USDB',
fullName: 'USDB',
isOneToken: false,
atCoingecko: true,
}
},
[TokenName.USDBC]: {
[ChainId.Base]: {
tokenName: TokenName.USDBC,
Expand Down Expand Up @@ -2666,6 +2681,17 @@ export const TOKENS: TokenMapping = {
isOneToken: false,
atCoingecko: true,
},
[ChainId.Blast]: {
tokenName: TokenName.WETH,
tableName: tokenNameWithChainPrefix(TokenName.WETH, ChainId.Blast),
address: '0x4300000000000000000000000000000000000004',
decimals: 18,
displayName: 'WETH',
symbol: 'WETH',
fullName: 'Wrapped Ether',
isOneToken: false,
atCoingecko: true,
},
[ChainId.Eon]: {
tokenName: TokenName.WETH,
tableName: `eon_${TokenName.WETH}`,
Expand Down
18 changes: 18 additions & 0 deletions src/crypto/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export enum ChainId {
Avalanche = 43114,
Mumbai = 80001,
Base = 8453,
Blast = 81457,
Bsc = 56,
Celo = 42220,
Eon = 7332,
Expand Down Expand Up @@ -175,6 +176,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = {
}
}
},
[ChainId.Blast]: {
chainId: ChainId.Blast,
name: 'Blast',
color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)',
icon: generateIconUrl(ChainId.Blast, 'svg'),
env: 'mainnet',
scanLink: 'blastscan.io',
scanName: 'BlastScan',
coingecko: 'blast',
rpc: {
rpcUrl: 'https://rpc.blast.io',
nativeCurrency: {
symbol: 'ETH',
name: 'ETH'
}
}
},
[ChainId.Bsc]: {
chainId: ChainId.Bsc,
name: 'BSC',
Expand Down
7 changes: 7 additions & 0 deletions src/crypto/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export const providerCacheReference: Record<ChainId, ProviderCache> = {
cacheHit: 0,
cacheMiss: 0
},
[ChainId.Blast]: {
lastUdated: 0,
cacheHit: 0,
cacheMiss: 0
},
[ChainId.Bsc]: {
lastUdated: 0,
cacheHit: 0,
Expand Down Expand Up @@ -217,6 +222,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => {
return EnvUtils.EnvName.GOERLI_RPC_HOSTS;
case ChainId.Base:
return EnvUtils.EnvName.BASE_RPC_HOSTS;
case ChainId.Blast:
return EnvUtils.EnvName.BLAST_RPC_HOSTS;
case ChainId.Bsc:
return EnvUtils.EnvName.BSC_RPC_HOSTS;
case ChainId.Celo:
Expand Down
1 change: 1 addition & 0 deletions src/enums/tokenName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export enum TokenName {
TRADE = 'trade',
UMA = 'uma',
UNI = 'uni',
USDB = 'usdb',
USDBC = 'usdbc',
USDC = 'usdc',
USDC2 = 'usdc2',
Expand Down
2 changes: 2 additions & 0 deletions src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export namespace EnvUtils {
MAINNET_RPC_HOSTS = 'MAINNET_RPC_HOSTS',
GOERLI_RPC_HOSTS = 'GOERLI_RPC_HOSTS',
BASE_RPC_HOSTS = 'BASE_RPC_HOSTS',
BLAST_RPC_HOSTS = 'BLAST_RPC_HOSTS',
BSC_RPC_HOSTS = 'BSC_RPC_HOSTS',
CELO_RPC_HOSTS = 'CELO_RPC_HOSTS',
EON_RPC_HOSTS = 'EON_RPC_HOSTS',
Expand All @@ -35,6 +36,7 @@ export namespace EnvUtils {
GATSBY_MAINNET_RPC_HOSTS = 'GATSBY_MAINNET_RPC_HOSTS',
GATSBY_GOERLI_RPC_HOSTS = 'GATSBY_GOERLI_RPC_HOSTS',
GATSBY_BASE_RPC_HOSTS = 'GATSBY_BASE_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',
GATSBY_EON_RPC_HOSTS = 'GATSBY_EON_RPC_HOSTS',
Expand Down

0 comments on commit a45a23d

Please sign in to comment.