ArbApiServer

Trait ArbApiServer 

Source
pub trait ArbApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn maintenance_status(&self) -> RpcResult<ArbMaintenanceStatus>;
    fn check_publisher_health(&self) -> RpcResult<()>;
    fn get_block_info<'life0, 'async_trait>(
        &'life0 self,
        block_num: u64,
    ) -> Pin<Box<dyn Future<Output = RpcResult<ArbBlockInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_raw_block_metadata<'life0, 'async_trait>(
        &'life0 self,
        from_block: BlockNumberOrTag,
        to_block: BlockNumberOrTag,
    ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<NumberAndBlockMetadata>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn trace_stylus_hostio<'life0, 'async_trait>(
        &'life0 self,
        tx_hash: B256,
    ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<HostioTraceInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_validated_block(&self) -> RpcResult<B256>;
    fn get_l1_confirmations<'life0, 'async_trait>(
        &'life0 self,
        block_num: u64,
    ) -> Pin<Box<dyn Future<Output = RpcResult<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn find_batch_containing_block<'life0, 'async_trait>(
        &'life0 self,
        block_num: u64,
    ) -> Pin<Box<dyn Future<Output = RpcResult<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the ArbApi RPC API.

Required Methods§

Source

fn maintenance_status(&self) -> RpcResult<ArbMaintenanceStatus>

Returns the maintenance status of the node.

Source

fn check_publisher_health(&self) -> RpcResult<()>

Publisher health check. Errors when the node is not configured as a transaction publisher (the executor-only mode here).

Source

fn get_block_info<'life0, 'async_trait>( &'life0 self, block_num: u64, ) -> Pin<Box<dyn Future<Output = RpcResult<ArbBlockInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns block info for the given block number.

Source

fn get_raw_block_metadata<'life0, 'async_trait>( &'life0 self, from_block: BlockNumberOrTag, to_block: BlockNumberOrTag, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<NumberAndBlockMetadata>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Raw block metadata for blocks in [fromBlock, toBlock]. The rawMetadata field is empty since no sidecar data is tracked.

Source

fn trace_stylus_hostio<'life0, 'async_trait>( &'life0 self, tx_hash: B256, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<HostioTraceInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stylus host-I/O trace for a previously-executed transaction. Empty if no Stylus contracts were invoked.

Source

fn get_validated_block(&self) -> RpcResult<B256>

Currently-set validated block hash. Zero hash when unset.

Source

fn get_l1_confirmations<'life0, 'async_trait>( &'life0 self, block_num: u64, ) -> Pin<Box<dyn Future<Output = RpcResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

L1 confirmations for the L2 block at block_num. Returns 0 without an L1 reader.

Source

fn find_batch_containing_block<'life0, 'async_trait>( &'life0 self, block_num: u64, ) -> Pin<Box<dyn Future<Output = RpcResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

L1 batch number containing the L2 block at block_num. Errors without an L1 batch index.

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

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<Provider> ArbApiServer for ArbApiHandler<Provider>
where Provider: BlockNumReader + BlockReaderIdExt + HeaderProvider + 'static,