pub trait EthApiSpec: RpcNodeCore + EthApiTypes {
// Required method
fn starting_block(&self) -> Uint<256, 4>;
// Provided 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 capabilities(&self) -> Result<EthCapabilities, RethError>
where Self: EthState { ... }
fn is_syncing(&self) -> bool { ... }
fn sync_status(&self) -> Result<SyncStatus, RethError> { ... }
}Available on crate feature
rpc only.Expand description
Eth API trait.
Defines core functionality of the eth API implementation.
Required Methods§
Sourcefn starting_block(&self) -> Uint<256, 4>
fn starting_block(&self) -> Uint<256, 4>
Returns the block node is started on.
Provided 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 capabilities(&self) -> Result<EthCapabilities, RethError>where
Self: EthState,
fn capabilities(&self) -> Result<EthCapabilities, RethError>where
Self: EthState,
Returns effective routing capabilities for this node.
The response follows the eth_capabilities execution API proposal:
https://github.com/ethereum/execution-apis/pull/755.
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".