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

Commit

Permalink
feat: add metis support
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Apr 19, 2023
1 parent 6ebb1b2 commit 776aebb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ethers-core/src/types/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ pub enum Chain {

ScrollAlphaTestnet = 534353,

Metis = 1088,

#[strum(to_string = "xdai", serialize = "gnosis", serialize = "gnosis-chain")]
#[serde(alias = "xdai", alias = "gnosis", alias = "gnosis_chain")]
XDai = 100,
Expand Down Expand Up @@ -280,7 +282,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 | BaseGoerli | ZkSync => return None,
EmeraldTestnet | Boba | BaseGoerli | ZkSync | Metis => return None,
};

Some(Duration::from_millis(ms))
Expand Down Expand Up @@ -338,7 +340,7 @@ impl Chain {
Dev | AnvilHardhat | Morden | Ropsten | Rinkeby | Cronos | CronosTestnet | Kovan |
Sokol | Poa | XDai | Moonbeam | MoonbeamDev | Moonriver | Moonbase | Evmos |
EvmosTestnet | Chiado | Aurora | AuroraTestnet | Canto | CantoTestnet |
ScrollAlphaTestnet => false,
ScrollAlphaTestnet | Metis => false,
}
}

Expand Down Expand Up @@ -427,6 +429,10 @@ impl Chain {
("https://blockscout.scroll.io/api", "https://blockscout.scroll.io/")
}

Metis => {
("https://andromeda-explorer.metis.io/api", "https://andromeda-explorer.metis.io/")
}

Chiado => {
("https://blockscout.chiadochain.net/api", "https://blockscout.chiadochain.net")
}
Expand Down Expand Up @@ -544,6 +550,7 @@ impl Chain {
// Explicitly exhaustive. See NB above.
XDai |
ScrollAlphaTestnet |
Metis |
Chiado |
Sepolia |
Rsk |
Expand Down

0 comments on commit 776aebb

Please sign in to comment.