EngineEthApiServer

Trait EngineEthApiServer 

pub trait EngineEthApiServer<TxReq, B, R>:
    Sized
    + Send
    + Sync
    + 'static
where TxReq: RpcObject, B: RpcObject, R: RpcObject,
{
Show 13 methods // 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: TxReq, block_id: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, 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_id: 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<B>, 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<B>, ErrorObject<'static>>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn block_receipts<'life0, 'async_trait>( &'life0 self, block_id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<R>>, 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 transaction_receipt<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<R>, 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; fn get_proof<'life0, 'async_trait>( &'life0 self, address: Address, keys: Vec<JsonStorageKey>, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<EIP1186AccountProofResponse, ErrorObject<'static>>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; // Provided method fn into_rpc(self) -> RpcModule<Self> where TxReq: Send + Sync + 'static + DeserializeOwned, B: Send + Sync + 'static + Clone + Serialize, R: Send + Sync + 'static + Clone + Serialize { ... }
}
Expand description

Server trait implementation for the EngineEthApi RPC API.

Required Methods§

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

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

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.

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

Returns the number of most recent block.

fn call<'life0, 'async_trait>( &'life0 self, request: TxReq, block_id: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, 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.

fn get_code<'life0, 'async_trait>( &'life0 self, address: Address, block_id: 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.

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

Returns information about a block by hash.

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

Returns information about a block by number.

fn block_receipts<'life0, 'async_trait>( &'life0 self, block_id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<R>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns all transaction receipts for a given block.

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.

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

Returns the receipt of a transaction by transaction hash.

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.

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

Returns the account and storage values of the specified account including the Merkle-proof. This call can be used to verify that the data you are pulling from is not tampered with.

Provided Methods§

fn into_rpc(self) -> RpcModule<Self>
where TxReq: Send + Sync + 'static + DeserializeOwned, B: Send + Sync + 'static + Clone + Serialize, R: Send + Sync + 'static + Clone + Serialize,

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.

Implementations on Foreign Types§

Source§

impl<Eth, EthFilter> EngineEthApiServer<<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, Block<<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse, <<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::Header>, <<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::Receipt> for EngineEthApi<Eth, EthFilter>

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: <<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, block_id: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, 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_id: 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<Block<<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse, <<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>, 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<Block<<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse, <<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>, 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

Source§

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

Handler for eth_getProof

Source§

fn block_receipts<'life0, 'async_trait>( &'life0 self, block_id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::Receipt>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, EngineEthApi<Eth, EthFilter>: 'async_trait,

Source§

fn transaction_receipt<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::Receipt>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, EngineEthApi<Eth, EthFilter>: 'async_trait,

Implementors§