Skip to main content

RethApiClient

Trait RethApiClient 

Source
pub trait RethApiClient: SubscriptionClientT {
    // Provided methods
    fn reth_get_balance_changes_in_block(
        &self,
        block_id: BlockId,
    ) -> impl Future<Output = Result<HashMap<Address, Uint<256, 4>, FbBuildHasher<20>>, Error>> + Send { ... }
    fn reth_get_block_execution_outcome(
        &self,
        block_id: BlockId,
        count: Option<Uint<64, 1>>,
    ) -> impl Future<Output = Result<Option<Value>, Error>> + Send { ... }
    fn reth_subscribe_chain_notifications(
        &self,
    ) -> impl Future<Output = Result<Subscription<CanonStateNotification>, Error>> + Send { ... }
    fn reth_subscribe_persisted_block(
        &self,
    ) -> impl Future<Output = Result<Subscription<NumHash>, Error>> + Send { ... }
    fn reth_subscribe_finalized_chain_notifications(
        &self,
    ) -> impl Future<Output = Result<Subscription<Vec<CanonStateNotification>>, Error>> + Send { ... }
}
Expand description

Client implementation for the RethApi RPC API.

Provided Methods§

Source

fn reth_get_balance_changes_in_block( &self, block_id: BlockId, ) -> impl Future<Output = Result<HashMap<Address, Uint<256, 4>, FbBuildHasher<20>>, Error>> + Send

Returns all ETH balance changes in a block

Source

fn reth_get_block_execution_outcome( &self, block_id: BlockId, count: Option<Uint<64, 1>>, ) -> impl Future<Output = Result<Option<Value>, Error>> + Send

Re-executes a block (or a range of blocks) and returns the execution outcome including receipts, state changes, and EIP-7685 requests.

If count is provided, re-executes count consecutive blocks starting from block_id and returns the merged execution outcome.

Source

fn reth_subscribe_chain_notifications( &self, ) -> impl Future<Output = Result<Subscription<CanonStateNotification>, Error>> + Send

Subscribe to json ChainNotifications

Source

fn reth_subscribe_persisted_block( &self, ) -> impl Future<Output = Result<Subscription<NumHash>, Error>> + Send

Subscribe to persisted block notifications.

Emits a notification with the block number and hash when a new block is persisted to disk.

Source

fn reth_subscribe_finalized_chain_notifications( &self, ) -> impl Future<Output = Result<Subscription<Vec<CanonStateNotification>>, Error>> + Send

Subscribe to finalized chain notifications.

Buffers committed chain notifications and emits them once a new finalized block is received. Each notification contains all committed chain segments up to the finalized block.

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.

Implementors§

Source§

impl<TypeJsonRpseeInternal> RethApiClient for TypeJsonRpseeInternal
where TypeJsonRpseeInternal: SubscriptionClientT,