Skip to content

Commit

Permalink
add: CHAIN_NAME_TO_INNER_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Mithreum committed Oct 15, 2024
1 parent 53da167 commit 7ddfed1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/factory/types/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Chain } from ".";

export type TChainName = "arbitrum"
| "avalanche"
| "base"
| "bsc"
| "ethereum"
| "optimism"
| "polygon"
| "solana"
| "ton"
;

export const CHAIN_NAME_TO_INNER_ID: { [key in TChainName]: number } = {
// Mainnets:
arbitrum: Chain.ARBITRUM,
avalanche: Chain.AVALANCHE,
base: Chain.BASE,
ethereum: Chain.ETHEREUM,
optimism: Chain.OPTIMISM,
polygon: Chain.POLYGON,
ton: Chain.TON,
solana: Chain.SOLANA,
bsc: Chain.BSC
};
2 changes: 2 additions & 0 deletions src/factory/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export type MetaMap = {
2: EvmMeta;
3: EvmMeta;
4: EvmMeta;
5: EvmMeta; // TODO: fix temp
6: EvmMeta;
7: EvmMeta;
65535: TonMeta;
Expand All @@ -41,6 +42,7 @@ export namespace Chain {
export const OPTIMISM = 2;
export const ARBITRUM = 3;
export const BSC = 4;
export const SOLANA = 5;
export const BASE = 6;
export const POLYGON = 7;
export const TON = 65535;
Expand Down

0 comments on commit 7ddfed1

Please sign in to comment.