pub struct NetworkConfig {
pub chain_id: i32,
pub chain_name: String,
pub rpc_urls: Vec<String>,
pub block_explorer_urls: Vec<String>,
pub icon_urls: Vec<String>,
pub native_currency: NetworkCurrency,
}Expand description
Network config informato, use EIP-3085
Fields§
§chain_id: i32Chain id
chain_name: StringChain name
rpc_urls: Vec<String>List of endpoints
block_explorer_urls: Vec<String>list of block explorer urls
icon_urls: Vec<String>List of chain icon urls
native_currency: NetworkCurrencyNative currency config
Implementations§
Source§impl NetworkConfig
impl NetworkConfig
Sourcepub fn from(network: Network) -> NetworkConfig
pub fn from(network: Network) -> NetworkConfig
Get the network config
Trait Implementations§
Source§impl Default for NetworkConfig
impl Default for NetworkConfig
Source§fn default() -> NetworkConfig
fn default() -> NetworkConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnwindSafe for NetworkConfig
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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