Skip to content

Commit

Permalink
added base mainnet to the list of supported networks
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Jul 14, 2023
1 parent 849afd4 commit 0b645f6
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
20 changes: 20 additions & 0 deletions src/collections/networks.ts
Expand Up @@ -131,6 +131,25 @@ const goerli: Network = {
};

// base
const base: Network = {
networkName: "base",
chainName: "Base Mainnet",
chainNameShort: "Base",
chainId: 8453,
nativeCurrency: {
name: "ETH",
symbol: "ETH", // 2-6 characters long
decimals: 18,
},
rpcUrls: [
// temp rpc url
"https://developer-access-mainnet.base.org",
"https://mainnet.base.org",
],
blockExplorerUrls: ["https://basescan.org"],
blockExplorerApiUrls: ["https://api-goerli.basescan.org/api"],
addresses: addresses["base"] as Addresses,
};
const basegoerli: Network = {
networkName: "basegoerli",
chainName: "Base Goerli Testnet",
Expand Down Expand Up @@ -163,5 +182,6 @@ export const SupportedNetworks: Partial<{
celo,
alfajores,
// base
base,
basegoerli,
};
3 changes: 2 additions & 1 deletion src/interface/network-name.ts
Expand Up @@ -12,6 +12,7 @@ export type NetworkName =
| "bsctest" // testnet
| "bsc" // mainnet
// base
| "basegoerli"
| "basegoerli" // testnet
| "base" // mainnet
// fallback for unknown networks
| "unknown";
3 changes: 2 additions & 1 deletion src/networks/addresses.ts
@@ -1,5 +1,5 @@
import type { Addresses, NetworkName } from "../interface";
import { basegoerli } from "./base";
import { base, basegoerli } from "./base";
import { bsc, bsctest } from "./bsc";
import { alfajores, celo } from "./celo";
import { ethereum, goerli } from "./eth";
Expand All @@ -19,5 +19,6 @@ export const addresses: Partial<{ [key in NetworkName]: Addresses }> = {
mumbai,
polygon,
// base
base,
basegoerli,
};
3 changes: 3 additions & 0 deletions src/networks/base/base.ts
@@ -0,0 +1,3 @@
import type { Addresses } from "../../interface";

export const base: Addresses = {};
1 change: 1 addition & 0 deletions src/networks/base/index.ts
@@ -1 +1,2 @@
export * from "./base";
export * from "./basegoerli";

0 comments on commit 0b645f6

Please sign in to comment.