#[non_exhaustive]pub enum Chain {
Show 39 variants
Ethereum,
Goerli,
Sepolia,
Holesky,
Optimism,
OptimismSepolia,
Bsc,
BscTestnet,
Gnosis,
Polygon,
Mumbai,
Amoy,
Fantom,
FantomTestnet,
Moonbeam,
Moonriver,
Arbitrum,
ArbitrumNova,
ArbitrumSepolia,
Avalanche,
AvalancheFuji,
Celo,
Base,
BaseSepolia,
Linea,
LineaTestnet,
ZkSync,
ZkSyncSepolia,
Scroll,
ScrollSepolia,
Blast,
BlastSepolia,
Mantle,
Mode,
Fraxtal,
Klaytn,
Aurora,
PolygonZkEvm,
Other(u64),
}Expand description
Common EVM chain identifiers
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ethereum
Ethereum Mainnet (1)
Goerli
Goerli Testnet (5) - deprecated
Sepolia
Sepolia Testnet (11155111)
Holesky
Holesky Testnet (17000)
Optimism
Optimism (10)
OptimismSepolia
Optimism Sepolia (11155420)
Bsc
BNB Smart Chain (56)
BscTestnet
BNB Smart Chain Testnet (97)
Gnosis
Gnosis/xDai (100)
Polygon
Polygon/Matic (137)
Mumbai
Polygon Mumbai (80001) - deprecated
Amoy
Polygon Amoy (80002)
Fantom
Fantom Opera (250)
FantomTestnet
Fantom Testnet (4002)
Moonbeam
Moonbeam (1284)
Moonriver
Moonriver (1285)
Arbitrum
Arbitrum One (42161)
ArbitrumNova
Arbitrum Nova (42170)
ArbitrumSepolia
Arbitrum Sepolia (421614)
Avalanche
Avalanche C-Chain (43114)
AvalancheFuji
Avalanche Fuji (43113)
Celo
Celo (42220)
Base
Base (8453)
BaseSepolia
Base Sepolia (84532)
Linea
Linea (59144)
LineaTestnet
Linea Testnet (59140)
ZkSync
zkSync Era (324)
ZkSyncSepolia
zkSync Sepolia (300)
Scroll
Scroll (534352)
ScrollSepolia
Scroll Sepolia (534351)
Blast
Blast (81457)
BlastSepolia
Blast Sepolia (168587773)
Mantle
Mantle (5000)
Mode
Mode (34443)
Fraxtal
Fraxtal (252)
Klaytn
Klaytn (8217)
Aurora
Aurora (1313161554)
PolygonZkEvm
Polygon zkEVM (1101)
Other(u64)
Unknown chain with custom ID
Implementations§
Source§impl Chain
impl Chain
Sourcepub const fn display_name(&self) -> &'static str
pub const fn display_name(&self) -> &'static str
Get the display name (human-readable)
Sourcepub const fn native_currency(&self) -> &'static str
pub const fn native_currency(&self) -> &'static str
Get the native currency symbol
Sourcepub const fn is_testnet(&self) -> bool
pub const fn is_testnet(&self) -> bool
Check if this is a testnet
Sourcepub const fn is_mainnet(&self) -> bool
pub const fn is_mainnet(&self) -> bool
Check if this is a mainnet
Trait Implementations§
impl Copy for Chain
impl Eq for Chain
impl StructuralPartialEq for Chain
Auto Trait Implementations§
impl Freeze for Chain
impl RefUnwindSafe for Chain
impl Send for Chain
impl Sync for Chain
impl Unpin for Chain
impl UnwindSafe for Chain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.