Skip to content

Commit

Permalink
added testnet flag
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Sep 21, 2023
1 parent 997ecba commit 707320b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/collections/networks.ts
Expand Up @@ -6,6 +6,7 @@ const bsc: Network = {
networkName: "bsc",
chainName: "Binance Smart Chain",
chainNameShort: "BSC",
isTestnet: false,
chainId: 56,
rpcUrls: ["https://endpoints.omniatech.io/v1/bsc/mainnet/public"],
nativeCurrency: {
Expand All @@ -21,6 +22,7 @@ const bsctest: Network = {
networkName: "bsctest",
chainName: "Binance Smart Chain Testnet",
chainNameShort: "BSC Testnet",
isTestnet: true,
chainId: 97,
rpcUrls: ["https://data-seed-prebsc-1-s1.binance.org:8545"],
nativeCurrency: {
Expand All @@ -38,6 +40,7 @@ const opbnb: Network = {
networkName: "opbnb",
chainName: "opBNB Mainnet",
chainNameShort: "opBNB",
isTestnet: false,
chainId: 204,
rpcUrls: ["https://opbnb-mainnet-rpc.bnbchain.org"],
nativeCurrency: {
Expand All @@ -52,6 +55,7 @@ const opbnbtest: Network = {
networkName: "opbnbtest",
chainName: "opBNB Testnet",
chainNameShort: "opBNB Test",
isTestnet: true,
chainId: 5611,
rpcUrls: ["https://opbnb-testnet-rpc.bnbchain.org"],
nativeCurrency: {
Expand All @@ -68,6 +72,7 @@ const celo: Network = {
networkName: "celo",
chainName: "Celo Mainnet",
chainNameShort: "Celo",
isTestnet: false,
chainId: 42220,
rpcUrls: ["https://forno.celo.org"],
nativeCurrency: {
Expand All @@ -83,6 +88,7 @@ const alfajores: Network = {
networkName: "alfajores",
chainName: "Alfajores Network",
chainNameShort: "Alfajores",
isTestnet: true,
chainId: 44787,
rpcUrls: ["https://alfajores-forno.celo-testnet.org"],
nativeCurrency: {
Expand All @@ -100,6 +106,7 @@ const polygon: Network = {
networkName: "polygon",
chainName: "Polygon Mainnet",
chainNameShort: "Polygon",
isTestnet: false,
chainId: 137,
nativeCurrency: {
name: "MATIC",
Expand All @@ -115,6 +122,7 @@ const mumbai: Network = {
networkName: "mumbai",
chainName: "Mumbai Testnet",
chainNameShort: "Mumbai",
isTestnet: true,
chainId: 80001,
nativeCurrency: {
name: "tMATIC",
Expand All @@ -133,6 +141,7 @@ const ethereum: Network = {
networkName: "ethereum",
chainName: "Ethereum Mainnet",
chainNameShort: "Ethereum",
isTestnet: false,
chainId: 1,
nativeCurrency: {
name: "ETH",
Expand All @@ -148,6 +157,7 @@ const goerli: Network = {
networkName: "goerli",
chainName: "Goerli Testnet",
chainNameShort: "Goerli",
isTestnet: true,
chainId: 5,
nativeCurrency: {
name: "ETH",
Expand All @@ -165,6 +175,7 @@ const base: Network = {
networkName: "base",
chainName: "Base Mainnet",
chainNameShort: "Base",
isTestnet: false,
chainId: 8453,
nativeCurrency: {
name: "ETH",
Expand All @@ -180,6 +191,7 @@ const basegoerli: Network = {
networkName: "basegoerli",
chainName: "Base Goerli Testnet",
chainNameShort: "Base Goerli",
isTestnet: true,
chainId: 84531,
nativeCurrency: {
name: "ETH",
Expand Down
4 changes: 4 additions & 0 deletions src/interface/network.ts
Expand Up @@ -20,6 +20,10 @@ export interface Network {
* The networks chain id used to add the network to the wallet
*/
chainId: number;
/**
* is this network a test network or not?
*/
isTestnet: boolean;
/**
* The list of available rpc urls, required for adding the network
* to the wallet
Expand Down

0 comments on commit 707320b

Please sign in to comment.