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

feat: add Base Goerli chain #2338

Merged
merged 2 commits into from
Apr 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions ethers-core/src/types/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ pub enum Chain {
CantoTestnet = 740,

Boba = 288,

BaseGoerli = 84531,
}

// === impl Chain ===
Expand Down Expand Up @@ -272,7 +274,7 @@ impl Chain {
// Explicitly exhaustive. See NB above.
Morden | Ropsten | Rinkeby | Goerli | Kovan | XDai | Chiado | Sepolia | Moonbase |
MoonbeamDev | Optimism | OptimismGoerli | OptimismKovan | Poa | Sokol | Rsk |
EmeraldTestnet | Boba => return None,
EmeraldTestnet | Boba | BaseGoerli => return None,
};

Some(Duration::from_millis(ms))
Expand Down Expand Up @@ -311,7 +313,8 @@ impl Chain {
Celo |
CeloAlfajores |
CeloBaklava |
Boba => true,
Boba |
BaseGoerli => true,

// Known EIP-1559 chains
Mainnet |
Expand Down Expand Up @@ -459,6 +462,8 @@ impl Chain {
),

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

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

AnvilHardhat | Dev | Morden | MoonbeamDev | FilecoinMainnet => {
// this is explicitly exhaustive so we don't forget to add new urls when adding a
Expand Down Expand Up @@ -505,7 +510,8 @@ impl Chain {
AuroraTestnet |
Celo |
CeloAlfajores |
CeloBaklava => "ETHERSCAN_API_KEY",
CeloBaklava |
BaseGoerli => "ETHERSCAN_API_KEY",

Avalanche | AvalancheFuji => "SNOWTRACE_API_KEY",

Expand Down