Enum ethers_iqkms::types::Chain
source · [−]pub enum Chain {
Show 40 variants
Mainnet,
Morden,
Ropsten,
Rinkeby,
Goerli,
Kovan,
XDai,
Polygon,
Fantom,
Dev,
AnvilHardhat,
FantomTestnet,
PolygonMumbai,
Avalanche,
AvalancheFuji,
Sepolia,
Moonbeam,
Moonbase,
MoonbeamDev,
Moonriver,
Optimism,
OptimismGoerli,
OptimismKovan,
Arbitrum,
ArbitrumTestnet,
ArbitrumGoerli,
Cronos,
CronosTestnet,
BinanceSmartChain,
BinanceSmartChainTestnet,
Poa,
Sokol,
Rsk,
Oasis,
Emerald,
EmeraldTestnet,
Evmos,
EvmosTestnet,
Aurora,
AuroraTestnet,
}Expand description
Enum for all known chains
When adding a new chain:
- add new variant
- update Display/FromStr impl
- add etherscan_keys if supported
Variants
Mainnet
Morden
Ropsten
Rinkeby
Goerli
Kovan
XDai
Polygon
Fantom
Dev
AnvilHardhat
FantomTestnet
PolygonMumbai
Avalanche
AvalancheFuji
Sepolia
Moonbeam
Moonbase
MoonbeamDev
Moonriver
Optimism
OptimismGoerli
OptimismKovan
Arbitrum
ArbitrumTestnet
ArbitrumGoerli
Cronos
CronosTestnet
BinanceSmartChain
BinanceSmartChainTestnet
Poa
Sokol
Rsk
Oasis
Emerald
EmeraldTestnet
Evmos
EvmosTestnet
Aurora
AuroraTestnet
Implementations
sourceimpl Chain
impl Chain
sourcepub fn average_blocktime_hint(&self) -> Option<Duration>
pub fn average_blocktime_hint(&self) -> Option<Duration>
The blocktime varies from chain to chain
It can be beneficial to know the average blocktime to adjust the polling of an Http provider for example.
Note: this will not return the accurate average depending on the time but is rather a sensible default derived from blocktime charts like https://etherscan.com/chart/blocktime https://polygonscan.com/chart/blocktime
sourcepub fn etherscan_urls(&self) -> Option<(&'static str, &'static str)>
pub fn etherscan_urls(&self) -> Option<(&'static str, &'static str)>
Returns the corresponding etherscan URLs
Returns (API URL, BASE_URL), like ("https://api(-chain).etherscan.io/api", "https://etherscan.io")
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Chain
impl<'de> Deserialize<'de> for Chain
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Chain, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Chain, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl VariantNames for Chain
impl VariantNames for Chain
sourceconst VARIANTS: &'static [&'static str] = &["mainnet", "morden", "ropsten", "rinkeby", "goerli", "kovan", "xdai",
"polygon", "fantom", "dev", "anvil-hardhat", "fantom-testnet",
"polygon-mumbai", "avalanche", "avalanche-fuji", "sepolia",
"moonbeam", "moonbase", "moonbeam-dev", "moonriver", "optimism",
"optimism-goerli", "optimism-kovan", "arbitrum",
"arbitrum-testnet", "arbitrum-goerli", "cronos", "cronos-testnet",
"bsc", "bsc-testnet", "poa", "sokol", "rsk", "oasis", "emerald",
"emerald-testnet", "evmos", "evmos-testnet", "aurora",
"aurora-testnet"]
const VARIANTS: &'static [&'static str] = &["mainnet", "morden", "ropsten", "rinkeby", "goerli", "kovan", "xdai", "polygon", "fantom", "dev", "anvil-hardhat", "fantom-testnet", "polygon-mumbai", "avalanche", "avalanche-fuji", "sepolia", "moonbeam", "moonbase", "moonbeam-dev", "moonriver", "optimism", "optimism-goerli", "optimism-kovan", "arbitrum", "arbitrum-testnet", "arbitrum-goerli", "cronos", "cronos-testnet", "bsc", "bsc-testnet", "poa", "sokol", "rsk", "oasis", "emerald", "emerald-testnet", "evmos", "evmos-testnet", "aurora", "aurora-testnet"]
Names of the variants of this enum
impl Copy for Chain
impl Eq for Chain
impl StructuralEq for Chain
impl StructuralPartialEq for Chain
Auto Trait Implementations
impl RefUnwindSafe for Chain
impl Send for Chain
impl Sync for Chain
impl Unpin for Chain
impl UnwindSafe for Chain
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request