pub struct EvmChainClient { /* private fields */ }Expand description
EVM implementation of ChainClient.
Wraps any Arc<dyn RpcTransport> and translates ChainClient methods
into the appropriate eth_* JSON-RPC calls.
Implementations§
Trait Implementations§
Source§impl ChainClient for EvmChainClient
impl ChainClient for EvmChainClient
Source§fn get_head_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_head_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the current head height (block number / slot / checkpoint).
Source§fn get_block_by_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<ChainBlock>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_by_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<ChainBlock>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a block by its height. Read more
Source§fn chain_id(&self) -> &str
fn chain_id(&self) -> &str
Return the chain identifier (e.g.
"1" for Ethereum mainnet,
"mainnet-beta" for Solana).Source§fn chain_family(&self) -> &str
fn chain_family(&self) -> &str
Return the chain family name (e.g.
"evm", "solana", "cosmos").Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Perform a health check against the underlying transport.
Auto Trait Implementations§
impl Freeze for EvmChainClient
impl !RefUnwindSafe for EvmChainClient
impl Send for EvmChainClient
impl Sync for EvmChainClient
impl Unpin for EvmChainClient
impl UnsafeUnpin for EvmChainClient
impl !UnwindSafe for EvmChainClient
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