[go: nahoru, domu]

Skip to content

Commit

Permalink
chore: rustfmt (#2760)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Mar 6, 2024
1 parent c2d846c commit 7da9dec
Showing 1 changed file with 122 additions and 122 deletions.
244 changes: 122 additions & 122 deletions ethers-core/src/types/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,11 @@ impl Chain {
Mode | ModeSepolia => 2_000,
Elastos => 5_000,
// Explicitly exhaustive. See NB above.
Morden | Ropsten | Rinkeby | Goerli | Kovan | Sepolia | Holesky | Moonbase
| MoonbeamDev | OptimismKovan | Poa | Sokol | Rsk | EmeraldTestnet | Boba | Base
| BaseGoerli | BaseSepolia | Blast | BlastSepolia | ZkSync | ZkSyncTestnet
| PolygonZkEvm | PolygonZkEvmTestnet | Metis | Linea | LineaTestnet | Mantle
| MantleTestnet | Zora | ZoraGoerli | ZoraSepolia => return None,
Morden | Ropsten | Rinkeby | Goerli | Kovan | Sepolia | Holesky | Moonbase |
MoonbeamDev | OptimismKovan | Poa | Sokol | Rsk | EmeraldTestnet | Boba | Base |
BaseGoerli | BaseSepolia | Blast | BlastSepolia | ZkSync | ZkSyncTestnet |
PolygonZkEvm | PolygonZkEvmTestnet | Metis | Linea | LineaTestnet | Mantle |
MantleTestnet | Zora | ZoraGoerli | ZoraSepolia => return None,
};

Some(Duration::from_millis(ms))
Expand All @@ -359,70 +359,70 @@ impl Chain {

match self {
// Known legacy chains / non EIP-1559 compliant
OptimismKovan
| Fantom
| FantomTestnet
| BinanceSmartChain
| BinanceSmartChainTestnet
| ArbitrumTestnet
| Rsk
| Oasis
| Emerald
| EmeraldTestnet
| Celo
| CeloAlfajores
| CeloBaklava
| Boba
| ZkSync
| ZkSyncTestnet
| Mantle
| MantleTestnet
| PolygonZkEvm
| PolygonZkEvmTestnet
| Metis
| Viction
| Scroll
| ScrollSepolia
| Elastos => true,
OptimismKovan |
Fantom |
FantomTestnet |
BinanceSmartChain |
BinanceSmartChainTestnet |
ArbitrumTestnet |
Rsk |
Oasis |
Emerald |
EmeraldTestnet |
Celo |
CeloAlfajores |
CeloBaklava |
Boba |
ZkSync |
ZkSyncTestnet |
Mantle |
MantleTestnet |
PolygonZkEvm |
PolygonZkEvmTestnet |
Metis |
Viction |
Scroll |
ScrollSepolia |
Elastos => true,

// Known EIP-1559 chains
Mainnet
| Goerli
| Sepolia
| Holesky
| Base
| BaseGoerli
| BaseSepolia
| Blast
| BlastSepolia
| Optimism
| OptimismGoerli
| OptimismSepolia
| Polygon
| PolygonMumbai
| PolygonAmoy
| Avalanche
| AvalancheFuji
| Arbitrum
| ArbitrumGoerli
| ArbitrumSepolia
| ArbitrumNova
| FilecoinMainnet
| Linea
| LineaTestnet
| FilecoinCalibrationTestnet
| Gnosis
| Chiado
| Mode
| ModeSepolia
| Zora
| ZoraGoerli
| ZoraSepolia => false,
Mainnet |
Goerli |
Sepolia |
Holesky |
Base |
BaseGoerli |
BaseSepolia |
Blast |
BlastSepolia |
Optimism |
OptimismGoerli |
OptimismSepolia |
Polygon |
PolygonMumbai |
PolygonAmoy |
Avalanche |
AvalancheFuji |
Arbitrum |
ArbitrumGoerli |
ArbitrumSepolia |
ArbitrumNova |
FilecoinMainnet |
Linea |
LineaTestnet |
FilecoinCalibrationTestnet |
Gnosis |
Chiado |
Mode |
ModeSepolia |
Zora |
ZoraGoerli |
ZoraSepolia => false,

// Unknown / not applicable, default to false for backwards compatibility
Dev | AnvilHardhat | Morden | Ropsten | Rinkeby | Cronos | CronosTestnet | Kovan
| Sokol | Poa | Moonbeam | MoonbeamDev | Moonriver | Moonbase | Evmos
| EvmosTestnet | Aurora | AuroraTestnet | Canto | CantoTestnet | ScrollAlphaTestnet => {
Dev | AnvilHardhat | Morden | Ropsten | Rinkeby | Cronos | CronosTestnet | Kovan |
Sokol | Poa | Moonbeam | MoonbeamDev | Moonriver | Moonbase | Evmos |
EvmosTestnet | Aurora | AuroraTestnet | Canto | CantoTestnet | ScrollAlphaTestnet => {
false
}
}
Expand Down Expand Up @@ -666,42 +666,42 @@ impl Chain {
use Chain::*;

let api_key_name = match self {
Mainnet
| Morden
| Ropsten
| Kovan
| Rinkeby
| Goerli
| Holesky
| Optimism
| OptimismGoerli
| OptimismKovan
| OptimismSepolia
| BinanceSmartChain
| BinanceSmartChainTestnet
| Arbitrum
| ArbitrumTestnet
| ArbitrumGoerli
| ArbitrumSepolia
| ArbitrumNova
| Cronos
| CronosTestnet
| Aurora
| AuroraTestnet
| Celo
| CeloAlfajores
| CeloBaklava
| Base
| Linea
| Mantle
| MantleTestnet
| BaseGoerli
| BaseSepolia
| Blast
| BlastSepolia
| Gnosis
| Scroll
| ScrollSepolia => "ETHERSCAN_API_KEY",
Mainnet |
Morden |
Ropsten |
Kovan |
Rinkeby |
Goerli |
Holesky |
Optimism |
OptimismGoerli |
OptimismKovan |
OptimismSepolia |
BinanceSmartChain |
BinanceSmartChainTestnet |
Arbitrum |
ArbitrumTestnet |
ArbitrumGoerli |
ArbitrumSepolia |
ArbitrumNova |
Cronos |
CronosTestnet |
Aurora |
AuroraTestnet |
Celo |
CeloAlfajores |
CeloBaklava |
Base |
Linea |
Mantle |
MantleTestnet |
BaseGoerli |
BaseSepolia |
Blast |
BlastSepolia |
Gnosis |
Scroll |
ScrollSepolia => "ETHERSCAN_API_KEY",

Avalanche | AvalancheFuji => "SNOWTRACE_API_KEY",

Expand All @@ -720,27 +720,27 @@ impl Chain {
Boba => "BOBASCAN_API_KEY",

// Explicitly exhaustive. See NB above.
ScrollAlphaTestnet
| Metis
| Chiado
| Sepolia
| Rsk
| Sokol
| Poa
| Oasis
| Emerald
| EmeraldTestnet
| Evmos
| EvmosTestnet
| AnvilHardhat
| Dev
| ZkSync
| ZkSyncTestnet
| FilecoinMainnet
| LineaTestnet
| Viction
| FilecoinCalibrationTestnet
| Elastos => return None,
ScrollAlphaTestnet |
Metis |
Chiado |
Sepolia |
Rsk |
Sokol |
Poa |
Oasis |
Emerald |
EmeraldTestnet |
Evmos |
EvmosTestnet |
AnvilHardhat |
Dev |
ZkSync |
ZkSyncTestnet |
FilecoinMainnet |
LineaTestnet |
Viction |
FilecoinCalibrationTestnet |
Elastos => return None,
};

Some(api_key_name)
Expand Down

0 comments on commit 7da9dec

Please sign in to comment.