pub struct EvmConfig {
pub chain_id: ChainId,
pub rpc_urls: Vec<String>,
pub explorer_url: Option<String>,
pub symbol: String,
pub decimals: u8,
pub eip1559_supported: bool,
}Expand description
Configuration for EVM adapter
Fields§
§chain_id: ChainIdChain identifier
rpc_urls: Vec<String>RPC endpoint URLs (for failover)
explorer_url: Option<String>Block explorer URL (optional)
symbol: StringNative currency symbol
decimals: u8Native currency decimals (18 for most EVM chains)
eip1559_supported: boolWhether EIP-1559 is supported
Implementations§
Source§impl EvmConfig
impl EvmConfig
Sourcepub fn ethereum_mainnet() -> Self
pub fn ethereum_mainnet() -> Self
Create config for Ethereum Mainnet
Sourcepub fn ethereum_sepolia() -> Self
pub fn ethereum_sepolia() -> Self
Create config for Ethereum Sepolia testnet
Sourcepub fn arbitrum_one() -> Self
pub fn arbitrum_one() -> Self
Create config for Arbitrum One
Sourcepub fn custom(chain_id: u64, rpc_urls: Vec<String>, symbol: &str) -> Self
pub fn custom(chain_id: u64, rpc_urls: Vec<String>, symbol: &str) -> Self
Create a custom config
Sourcepub fn with_explorer(self, url: impl Into<String>) -> Self
pub fn with_explorer(self, url: impl Into<String>) -> Self
Set explorer URL
Sourcepub fn with_eip1559(self, supported: bool) -> Self
pub fn with_eip1559(self, supported: bool) -> Self
Set EIP-1559 support
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EvmConfig
impl<'de> Deserialize<'de> for EvmConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EvmConfig
impl RefUnwindSafe for EvmConfig
impl Send for EvmConfig
impl Sync for EvmConfig
impl Unpin for EvmConfig
impl UnwindSafe for EvmConfig
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> 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> 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