Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
feat: add base network (#2516)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra authored Jul 25, 2023
1 parent 738071d commit 2934792
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ethers-core/src/types/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ pub enum Chain {

Boba = 288,

Base = 8453,
BaseGoerli = 84531,

LineaTestnet = 59140,
Expand Down Expand Up @@ -296,7 +297,7 @@ impl Chain {
ScrollAlphaTestnet => 3_000,
// Explicitly exhaustive. See NB above.
Morden | Ropsten | Rinkeby | Goerli | Kovan | XDai | Chiado | Sepolia | Moonbase |
MoonbeamDev | OptimismKovan | Poa | Sokol | Rsk | EmeraldTestnet | Boba |
MoonbeamDev | OptimismKovan | Poa | Sokol | Rsk | EmeraldTestnet | Boba | Base |
BaseGoerli | ZkSync | ZkSyncTestnet | PolygonZkEvm | PolygonZkEvmTestnet | Metis |
LineaTestnet => return None,
};
Expand Down Expand Up @@ -335,14 +336,15 @@ impl Chain {
Boba |
ZkSync |
ZkSyncTestnet |
BaseGoerli |
PolygonZkEvm |
PolygonZkEvmTestnet => true,

// Known EIP-1559 chains
Mainnet |
Goerli |
Sepolia |
Base |
BaseGoerli |
Optimism |
OptimismGoerli |
Polygon |
Expand Down Expand Up @@ -520,6 +522,8 @@ impl Chain {

Boba => ("https://api.bobascan.com/api", "https://bobascan.com"),

Base => ("https://api.basescan.org/api", "https://basescan.org"),

BaseGoerli => ("https://api-goerli.basescan.org/api", "https://goerli.basescan.org"),

ZkSync => {
Expand Down Expand Up @@ -579,6 +583,7 @@ impl Chain {
Celo |
CeloAlfajores |
CeloBaklava |
Base |
BaseGoerli => "ETHERSCAN_API_KEY",

Avalanche | AvalancheFuji => "SNOWTRACE_API_KEY",
Expand Down

0 comments on commit 2934792

Please sign in to comment.