Trait reth::rpc::api::servers::EngineEthApiServer

source ·
pub trait EngineEthApiServer: Sized + Send + Sync + 'static {
    // Required methods
    fn syncing(&self) -> Result<SyncStatus, ErrorObject<'static>>;
    fn chain_id<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<64, 1>>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn block_number(&self) -> Result<Uint<256, 4>, ErrorObject<'static>>;
    fn call<'life0, 'async_trait>(
        &'life0 self,
        request: TransactionRequest,
        block_number: Option<BlockId>,
        state_overrides: Option<HashMap<Address, AccountOverride>>,
        block_overrides: Option<Box<BlockOverrides>>,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn get_code<'life0, 'async_trait>(
        &'life0 self,
        address: Address,
        block_number: Option<BlockId>,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn block_by_hash<'life0, 'async_trait>(
        &'life0 self,
        hash: FixedBytes<32>,
        full: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Rich<Block>>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn block_by_number<'life0, 'async_trait>(
        &'life0 self,
        number: BlockNumberOrTag,
        full: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Rich<Block>>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn send_raw_transaction<'life0, 'async_trait>(
        &'life0 self,
        bytes: Bytes,
    ) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn logs<'life0, 'async_trait>(
        &'life0 self,
        filter: Filter,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;

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

Server trait implementation for the EngineEthApi RPC API.

Required Methods§

source

fn syncing(&self) -> Result<SyncStatus, ErrorObject<'static>>

Returns an object with data about the sync status or false.

source

fn chain_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<64, 1>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns the chain ID of the current network.

source

fn block_number(&self) -> Result<Uint<256, 4>, ErrorObject<'static>>

Returns the number of most recent block.

source

fn call<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride>>, block_overrides: Option<Box<BlockOverrides>>, ) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Executes a new message call immediately without creating a transaction on the block chain.

source

fn get_code<'life0, 'async_trait>( &'life0 self, address: Address, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns code at a given address at given block number.

source

fn block_by_hash<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, full: bool, ) -> Pin<Box<dyn Future<Output = Result<Option<Rich<Block>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns information about a block by hash.

source

fn block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, full: bool, ) -> Pin<Box<dyn Future<Output = Result<Option<Rich<Block>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns information about a block by number.

source

fn send_raw_transaction<'life0, 'async_trait>( &'life0 self, bytes: Bytes, ) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Sends signed transaction, returning its hash.

source

fn logs<'life0, 'async_trait>( &'life0 self, filter: Filter, ) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns logs matching given filter object.

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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<Eth, EthFilter> EngineEthApiServer for EngineEthApi<Eth, EthFilter>
where Eth: EthApiServer, EthFilter: EthFilterApiServer,

source§

fn syncing(&self) -> Result<SyncStatus, ErrorObject<'static>>

Handler for: eth_syncing

source§

fn chain_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<64, 1>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, EngineEthApi<Eth, EthFilter>: 'async_trait,

Handler for: eth_chainId

source§

fn block_number(&self) -> Result<Uint<256, 4>, ErrorObject<'static>>

Handler for: eth_blockNumber

source§

fn call<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride>>, block_overrides: Option<Box<BlockOverrides>>, ) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, EngineEthApi<Eth, EthFilter>: 'async_trait,

Handler for: eth_call

source§

fn get_code<'life0, 'async_trait>( &'life0 self, address: Address, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, EngineEthApi<Eth, EthFilter>: 'async_trait,

Handler for: eth_getCode

source§

fn block_by_hash<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, full: bool, ) -> Pin<Box<dyn Future<Output = Result<Option<Rich<Block>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, EngineEthApi<Eth, EthFilter>: 'async_trait,

Handler for: eth_getBlockByHash

source§

fn block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, full: bool, ) -> Pin<Box<dyn Future<Output = Result<Option<Rich<Block>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, EngineEthApi<Eth, EthFilter>: 'async_trait,

Handler for: eth_getBlockByNumber

source§

fn send_raw_transaction<'life0, 'async_trait>( &'life0 self, bytes: Bytes, ) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, EngineEthApi<Eth, EthFilter>: 'async_trait,

Handler for: eth_sendRawTransaction

source§

fn logs<'life0, 'async_trait>( &'life0 self, filter: Filter, ) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, EngineEthApi<Eth, EthFilter>: 'async_trait,

Handler for eth_getLogs

Implementors§