Skip to content

Commit

Permalink
chore: resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonberg1997 committed Sep 20, 2024
1 parent d4c5a39 commit 6be74c7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 84 deletions.
4 changes: 2 additions & 2 deletions assets/chains.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

103 changes: 21 additions & 82 deletions src/named.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,35 +612,13 @@ impl NamedChain {

match self {
// Known legacy chains / non EIP-1559 compliant.
Acala
| AcalaMandalaTestnet
| AcalaTestnet
| ArbitrumTestnet
| BNBSmartChain
| BNBSmartChainTestnet
| Boba
| Celo
| CeloAlfajores
| CeloBaklava
| Elastos
| Emerald
| EmeraldTestnet
| Fantom
| FantomTestnet
| Karura
| KaruraTestnet
| MantleTestnet
| Metis
| Oasis
| OptimismKovan
| PolygonZkEvm
| PolygonZkEvmTestnet
| Ronin
| Rsk
| Shimmer
| Viction
| ZkSync
| ZkSyncTestnet => true,
Acala | AcalaMandalaTestnet | AcalaTestnet | ArbitrumTestnet | BNBSmartChain
| BNBSmartChainTestnet | Boba | Celo | CeloAlfajores | CeloBaklava | Elastos
| Emerald | EmeraldTestnet | Fantom | FantomTestnet | Karura | KaruraTestnet
| MantleTestnet | Metis | Oasis | OptimismKovan | PolygonZkEvm
| PolygonZkEvmTestnet | Ronin | Rsk | Shimmer | Viction | ZkSync | ZkSyncTestnet => {
true
}

// Known EIP-1559 chains.
Mainnet
Expand Down Expand Up @@ -862,11 +840,11 @@ impl NamedChain {

// Mainnets.
Mainnet | Optimism | Arbitrum | ArbitrumNova | Blast | Syndr | Cronos | Rsk
| BNBSmartChain | Poa | Sokol | Scroll | Metis | Gnosis | Polygon
| PolygonZkEvm | Fantom | Moonbeam | Moonriver | Moonbase | Evmos | Chiado | Oasis
| Emerald | FilecoinMainnet | Avalanche | Celo | Aurora | Canto | Boba | Base
| Fraxtal | Linea | ZkSync | Mantle | GravityAlphaMainnet | Xai | Zora | Pgn | Mode
| Viction | Elastos | Degen | OpBNBMainnet | Ronin | Taiko | Flare | Acala | Karura
| BNBSmartChain | Poa | Sokol | Scroll | Metis | Gnosis | Polygon | PolygonZkEvm
| Fantom | Moonbeam | Moonriver | Moonbase | Evmos | Chiado | Oasis | Emerald
| FilecoinMainnet | Avalanche | Celo | Aurora | Canto | Boba | Base | Fraxtal
| Linea | ZkSync | Mantle | GravityAlphaMainnet | Xai | Zora | Pgn | Mode | Viction
| Elastos | Degen | OpBNBMainnet | Ronin | Taiko | Flare | Acala | Karura
| Darwinia | Cfx | Crab | Pulsechain | Etherlink | Immutable => false,
}
}
Expand Down Expand Up @@ -1232,53 +1210,14 @@ impl NamedChain {
use NamedChain::*;

let api_key_name = match self {
Mainnet
| Morden
| Ropsten
| Kovan
| Rinkeby
| Goerli
| Holesky
| Optimism
| OptimismGoerli
| OptimismKovan
| OptimismSepolia
| BNBSmartChain
| BNBSmartChainTestnet
| OpBNBMainnet
| OpBNBTestnet
| Arbitrum
| ArbitrumTestnet
| ArbitrumGoerli
| ArbitrumSepolia
| ArbitrumNova
| Syndr
| SyndrSepolia
| Cronos
| CronosTestnet
| Aurora
| AuroraTestnet
| Celo
| CeloAlfajores
| CeloBaklava
| Base
| Linea
| Mantle
| MantleTestnet
| MantleSepolia
| Xai
| XaiSepolia
| BaseGoerli
| BaseSepolia
| Fraxtal
| FraxtalTestnet
| Blast
| BlastSepolia
| Gnosis
| Scroll
| ScrollSepolia
| Taiko
| TaikoHekla => "ETHERSCAN_API_KEY",
Mainnet | Morden | Ropsten | Kovan | Rinkeby | Goerli | Holesky | Optimism
| OptimismGoerli | OptimismKovan | OptimismSepolia | BNBSmartChain
| BNBSmartChainTestnet | OpBNBMainnet | OpBNBTestnet | Arbitrum | ArbitrumTestnet
| ArbitrumGoerli | ArbitrumSepolia | ArbitrumNova | Syndr | SyndrSepolia | Cronos
| CronosTestnet | Aurora | AuroraTestnet | Celo | CeloAlfajores | CeloBaklava
| Base | Linea | Mantle | MantleTestnet | MantleSepolia | Xai | XaiSepolia
| BaseGoerli | BaseSepolia | Fraxtal | FraxtalTestnet | Blast | BlastSepolia
| Gnosis | Scroll | ScrollSepolia | Taiko | TaikoHekla => "ETHERSCAN_API_KEY",

Avalanche | AvalancheFuji => "SNOWTRACE_API_KEY",

Expand Down Expand Up @@ -1425,7 +1364,7 @@ mod tests {
const ALIASES: &[(NamedChain, &[&str])] = &[
(Mainnet, &["ethlive"]),
(BNBSmartChain, &["bsc", "bnb-smart-chain"]),
(BNBSmartChainTestnet, &["bsc-testnet", "bnb-smart-chain-chapel"]),
(BNBSmartChainTestnet, &["bsc-testnet", "bnb-smart-chain-testnet"]),
(Gnosis, &["gnosis", "gnosis-chain"]),
(PolygonMumbai, &["mumbai"]),
(PolygonZkEvm, &["zkevm", "polygon-zkevm"]),
Expand Down

0 comments on commit 6be74c7

Please sign in to comment.