Skip to content

Commit

Permalink
feature: added scroll networks
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Oct 17, 2023
1 parent 1f65d7b commit fcd9bb5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
53 changes: 53 additions & 0 deletions src/collections/networks.ts
Expand Up @@ -312,6 +312,56 @@ const basegoerli: Network = {
addresses: addresses["basegoerli"] as Addresses,
};

// scroll mainnet
const scroll: Network = {
networkName: "scroll",
chainName: "Scroll Mainnet",
chainNameShort: "Scroll",
isTestnet: false,
chainId: 534352,
nativeCurrency: {
name: "ETH",
symbol: "ETH", // 2-6 characters long
decimals: 18,
},
rpcUrls: [
// default https
"https://rpc.scroll.io",
// alternative https
undefined,
// default wss
undefined,
// alternative wss
undefined,
],
blockExplorerUrls: ["https://scrollscan.com/"],
addresses: addresses["scroll"] as Addresses,
};
const scrollsepolia: Network = {
networkName: "scrollsepolia",
chainName: "Scroll Sepolia Testnet",
chainNameShort: "Scroll Sepolia",
isTestnet: true,
chainId: 534351,
nativeCurrency: {
name: "ETH",
symbol: "ETH", // 2-6 characters long
decimals: 18,
},
rpcUrls: [
// default https
"https://sepolia-rpc.scroll.io",
// alternative https
undefined,
// default wss
undefined,
// alternative wss
undefined,
],
blockExplorerUrls: ["https://sepolia.scrollscan.com"],
addresses: addresses["scrollsepolia"] as Addresses,
};

export const SupportedNetworks: Partial<{
[key in NetworkName]: Network;
}> = {
Expand All @@ -333,4 +383,7 @@ export const SupportedNetworks: Partial<{
// base
base,
basegoerli,
// scroll
scroll,
scrollsepolia,
};
3 changes: 3 additions & 0 deletions src/interface/network-name.ts
Expand Up @@ -17,5 +17,8 @@ export type NetworkName =
// base
| "basegoerli" // testnet
| "base" // mainnet
// scroll
| "scrollsepolia" // testnet
| "scroll" // mainnet
// fallback for unknown networks
| "unknown";

0 comments on commit fcd9bb5

Please sign in to comment.