pub trait EthApiSpec: RpcNodeCore<Provider: ChainSpecProvider<ChainSpec: EthereumHardforks> + BlockNumReader + StageCheckpointReader, Network: NetworkInfo> {
type Transaction;
// Required methods
fn starting_block(&self) -> U256;
fn signers(&self) -> &RwLock<Vec<Box<dyn EthSigner<Self::Transaction>>>>;
// Provided methods
fn protocol_version(&self) -> impl Future<Output = RethResult<U64>> + Send { ... }
fn chain_id(&self) -> U64 { ... }
fn chain_info(&self) -> RethResult<ChainInfo> { ... }
fn accounts(&self) -> Vec<Address> { ... }
fn is_syncing(&self) -> bool { ... }
fn sync_status(&self) -> RethResult<SyncStatus> { ... }
}
Expand description
Eth
API trait.
Defines core functionality of the eth
API implementation.
Required Associated Types§
Sourcetype Transaction
type Transaction
The transaction type signers are using.
Required Methods§
Sourcefn starting_block(&self) -> U256
fn starting_block(&self) -> U256
Returns the block node is started on.
Provided Methods§
Sourcefn protocol_version(&self) -> impl Future<Output = RethResult<U64>> + Send
fn protocol_version(&self) -> impl Future<Output = RethResult<U64>> + Send
Returns the current ethereum protocol version.
Sourcefn chain_info(&self) -> RethResult<ChainInfo>
fn chain_info(&self) -> RethResult<ChainInfo>
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) -> RethResult<SyncStatus>
fn sync_status(&self) -> RethResult<SyncStatus>
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", so this trait is not object safe.