Files
TheGame/packages/web/utils/networks.ts
vidvidvid ec8182d7da Role Onboarding using Quest Chains (#1150)
* feat: set up quests dashboard

move quest explorer to /quests/general

* feat: prepare containers for path-of-the-engaged and initiation quests

* chore(release): 0.2.0

* feat: add metacollab and web 3 onboarding categories

* feat: move initiation quests from notion -> metaOS

awyiss it's happening

* chore: lint quickfix

* feat: add descriptions, objectives, checkbox, collapse/expand

* add Dockerfile to .gitignore

* go

* quick fix

* upload proof modal

* config and install

* upload proof works

* show status of quests (pending, etc..)

* remove initiation & update engaged quests

* fix quest categories

add bridgebuilders, builders, patrons, fix icons

* typecheck fix

* fix address for bridgebuilders quests

* design of chain progress + small fix

* minor fixes

* using latest version of quest-chains sdk

* basic UI for quests

* using children for react-markdown

* better styling for quest tiles

* completed quest chain styling

* fixed toasts

* fixed imageLink

* added link to quest chains

* minor fixes

* added back to onboarding paths link

* fixed external link icon as absolute pos

* reduce gaps for mobile

Co-authored-by: Vid <vid@meisterlabs.com>
Co-authored-by: dan13ram <dan13ram@gmail.com>
2022-10-08 19:05:42 +01:00

74 lines
1.6 KiB
TypeScript

import { CONFIG } from 'config';
export type NetworkInfo = {
[chainId: string]: {
chainId: string;
name: string;
label: string;
symbol: string;
explorer: string;
rpc: string;
};
};
export const MAINNET = '0x1';
export const GOERLI = '0x5';
export const GNOSIS = '0x64';
export const POLYGON = '0x89';
export const MUMBAI = '0x013881';
export const NETWORK_INFO: NetworkInfo = {
[MAINNET]: {
chainId: MAINNET,
name: 'Ethereum Mainnet',
label: 'Ethereum',
symbol: 'ETH',
explorer: 'https://etherscan.io',
rpc: `https://mainnet.infura.io/v3/${CONFIG.infuraId}`,
},
[GOERLI]: {
chainId: GOERLI,
name: 'Goerli Testnet',
label: 'Goerli',
symbol: 'ETH',
explorer: 'https://goerli.etherscan.io',
rpc: `https://goerli.infura.io/v3/${CONFIG.infuraId}`,
},
[GNOSIS]: {
chainId: GNOSIS,
name: 'Gnosis Chain',
label: 'Gnosis',
symbol: 'xDAI',
explorer: 'https://blockscout.com/xdai/mainnet',
rpc: 'https://rpc.gnosischain.com/',
},
[POLYGON]: {
chainId: POLYGON,
name: 'Polygon',
label: 'Polygon',
symbol: 'MATIC',
explorer: 'https://polygonscan.com',
rpc: 'https://polygon-rpc.com',
},
[MUMBAI]: {
chainId: MUMBAI,
name: 'Mumbai',
label: 'Mumbai',
symbol: 'MATIC',
explorer: 'https://mumbai.polygonscan.com',
rpc: 'https://matic-mumbai.chainstacklabs.com',
},
};
export function getHexChainId(chain?: string): string {
switch (chain?.toLowerCase()) {
case 'xdai':
return GNOSIS;
case 'polygon':
return POLYGON;
case 'ethereum':
default:
return MAINNET;
}
}