pub trait EthApiSpec: Send + Sync {
// Required methods
fn protocol_version(
&self,
) -> impl Future<Output = Result<Uint<64, 1>, RethError>> + Send;
fn chain_id(&self) -> Uint<64, 1>;
fn chain_info(&self) -> Result<ChainInfo, RethError>;
fn accounts(&self) -> Vec<Address>;
fn is_syncing(&self) -> bool;
fn sync_status(&self) -> Result<SyncStatus, RethError>;
fn chain_spec(&self) -> Arc<ChainSpec>;
}
Expand description
Eth
API trait.
Defines core functionality of the eth
API implementation.
Required Methods§
sourcefn protocol_version(
&self,
) -> impl Future<Output = Result<Uint<64, 1>, RethError>> + Send
fn protocol_version( &self, ) -> impl Future<Output = Result<Uint<64, 1>, RethError>> + Send
Returns the current ethereum protocol version.
sourcefn chain_info(&self) -> Result<ChainInfo, RethError>
fn chain_info(&self) -> Result<ChainInfo, RethError>
Returns provider chain info
sourcefn is_syncing(&self) -> bool
fn is_syncing(&self) -> bool
Returns true
if the network is undergoing sync.
sourcefn sync_status(&self) -> Result<SyncStatus, RethError>
fn sync_status(&self) -> Result<SyncStatus, RethError>
Returns the SyncStatus
of the network
sourcefn chain_spec(&self) -> Arc<ChainSpec>
fn chain_spec(&self) -> Arc<ChainSpec>
Returns the configured [ChainSpec
].
Object Safety§
This trait is not object safe.