pub struct EvmNetwork {
pub network: String,
pub rpc_urls: Vec<String>,
pub explorer_urls: Option<Vec<String>>,
pub average_blocktime_ms: u64,
pub is_testnet: bool,
pub tags: Vec<String>,
pub chain_id: u64,
pub required_confirmations: u64,
pub features: Vec<String>,
pub symbol: String,
pub gas_price_cache: Option<GasPriceCacheConfig>,
}Fields§
§network: StringUnique network identifier (e.g., “mainnet”, “sepolia”, “custom-devnet”).
rpc_urls: Vec<String>List of RPC endpoint URLs for connecting to the network.
explorer_urls: Option<Vec<String>>List of Explorer endpoint URLs for connecting to the network.
average_blocktime_ms: u64Estimated average time between blocks in milliseconds.
is_testnet: boolFlag indicating if the network is a testnet.
List of arbitrary tags for categorizing or filtering networks.
chain_id: u64The unique chain identifier (Chain ID) for the EVM network.
required_confirmations: u64Number of block confirmations required before a transaction is considered final.
features: Vec<String>List of specific features supported by the network (e.g., “eip1559”).
symbol: StringThe symbol of the network’s native currency (e.g., “ETH”, “MATIC”).
gas_price_cache: Option<GasPriceCacheConfig>Gas price cache configuration
Implementations§
Source§impl EvmNetwork
impl EvmNetwork
pub fn is_optimism(&self) -> bool
pub fn is_rollup(&self) -> bool
Sourcepub fn lacks_mempool(&self) -> bool
pub fn lacks_mempool(&self) -> bool
Returns whether this network lacks mempool-like behavior (no public/pending pool).
Returns true if any tag in constants::LACKS_MEMPOOL_TAGS is present.
Currently includes:
- “no-mempool”
- “arbitrum-based”
- “optimism-based”
- “optimism” (deprecated; kept for compatibility)
pub fn is_arbitrum(&self) -> bool
pub fn is_polygon_zkevm(&self) -> bool
pub fn is_testnet(&self) -> bool
Sourcepub fn required_confirmations(&self) -> u64
pub fn required_confirmations(&self) -> u64
Returns the recommended number of confirmations needed for this network.
pub fn id(&self) -> u64
pub fn average_blocktime(&self) -> Option<Duration>
pub fn is_legacy(&self) -> bool
pub fn explorer_urls(&self) -> Option<&[String]>
pub fn public_rpc_urls(&self) -> Option<&[String]>
Trait Implementations§
Source§impl Clone for EvmNetwork
impl Clone for EvmNetwork
Source§fn clone(&self) -> EvmNetwork
fn clone(&self) -> EvmNetwork
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EvmNetwork
impl Debug for EvmNetwork
Source§impl Hash for EvmNetwork
impl Hash for EvmNetwork
Source§impl NetworkConfiguration for EvmNetwork
impl NetworkConfiguration for EvmNetwork
type Provider = EvmProvider
fn public_rpc_urls(&self) -> Vec<String>
fn new_provider( rpc_urls: Vec<RpcConfig>, timeout_seconds: u64, ) -> Result<Self::Provider, ProviderError>
Source§impl PartialEq for EvmNetwork
impl PartialEq for EvmNetwork
Source§impl TryFrom<NetworkRepoModel> for EvmNetwork
impl TryFrom<NetworkRepoModel> for EvmNetwork
Source§type Error = RepositoryError
type Error = RepositoryError
impl Eq for EvmNetwork
impl StructuralPartialEq for EvmNetwork
Auto Trait Implementations§
impl Freeze for EvmNetwork
impl RefUnwindSafe for EvmNetwork
impl Send for EvmNetwork
impl Sync for EvmNetwork
impl Unpin for EvmNetwork
impl UnwindSafe for EvmNetwork
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more