pub trait EngineEthApiServer<TxReq: RpcObject, B: RpcObject, R: RpcObject, L: RpcObject>:
Sized
+ Send
+ Sync
+ 'static {
Show 20 methods
// Required methods
fn syncing(&self) -> RpcResult<SyncStatus>;
fn chain_id(&self) -> impl Future<Output = RpcResult<Option<U64>>> + Send;
fn block_number(&self) -> RpcResult<U256>;
fn call(
&self,
request: TxReq,
block_id: Option<BlockId>,
state_overrides: Option<StateOverride>,
block_overrides: Option<Box<BlockOverrides>>,
) -> impl Future<Output = RpcResult<Bytes>> + Send;
fn get_code(
&self,
address: Address,
block_id: Option<BlockId>,
) -> impl Future<Output = RpcResult<Bytes>> + Send;
fn block_by_hash(
&self,
hash: B256,
full: bool,
) -> impl Future<Output = RpcResult<Option<B>>> + Send;
fn block_by_number(
&self,
number: BlockNumberOrTag,
full: bool,
) -> impl Future<Output = RpcResult<Option<B>>> + Send;
fn block_receipts(
&self,
block_id: BlockId,
) -> impl Future<Output = RpcResult<Option<Vec<R>>>> + Send;
fn raw_transaction_by_block_hash_and_index(
&self,
hash: B256,
index: Index,
) -> impl Future<Output = RpcResult<Option<Bytes>>> + Send;
fn raw_transaction_by_block_number_and_index(
&self,
number: BlockNumberOrTag,
index: Index,
) -> impl Future<Output = RpcResult<Option<Bytes>>> + Send;
fn send_raw_transaction(
&self,
bytes: Bytes,
) -> impl Future<Output = RpcResult<B256>> + Send;
fn transaction_receipt(
&self,
hash: B256,
) -> impl Future<Output = RpcResult<Option<R>>> + Send;
fn logs(
&self,
filter: Filter,
) -> impl Future<Output = RpcResult<Vec<L>>> + Send;
fn get_proof(
&self,
address: Address,
keys: Vec<JsonStorageKey>,
block_number: Option<BlockId>,
) -> impl Future<Output = RpcResult<EIP1186AccountProofResponse>> + Send;
fn get_multi_proof(
&self,
targets: Vec<(Address, Vec<B256>)>,
block_number: Option<BlockId>,
) -> impl Future<Output = RpcResult<Vec<EIP1186AccountProofResponse>>> + Send;
fn block_access_list_by_block_hash(
&self,
hash: B256,
) -> impl Future<Output = RpcResult<Option<BlockAccessList>>> + Send;
fn block_access_list_by_block_number(
&self,
number: BlockNumberOrTag,
) -> impl Future<Output = RpcResult<Option<BlockAccessList>>> + Send;
fn block_access_list(
&self,
block_id: BlockId,
) -> impl Future<Output = RpcResult<Option<BlockAccessList>>> + Send;
fn block_access_list_raw(
&self,
block: BlockId,
) -> impl Future<Output = RpcResult<Option<Bytes>>> + Send;
// 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,
L: Send + Sync + 'static + Clone + Serialize { ... }
}Expand description
Server trait implementation for the EngineEthApi RPC API.
Required Methods§
Sourcefn syncing(&self) -> RpcResult<SyncStatus>
fn syncing(&self) -> RpcResult<SyncStatus>
Returns an object with data about the sync status or false.
Sourcefn chain_id(&self) -> impl Future<Output = RpcResult<Option<U64>>> + Send
fn chain_id(&self) -> impl Future<Output = RpcResult<Option<U64>>> + Send
Returns the chain ID of the current network.
Sourcefn block_number(&self) -> RpcResult<U256>
fn block_number(&self) -> RpcResult<U256>
Returns the number of most recent block.
Sourcefn call(
&self,
request: TxReq,
block_id: Option<BlockId>,
state_overrides: Option<StateOverride>,
block_overrides: Option<Box<BlockOverrides>>,
) -> impl Future<Output = RpcResult<Bytes>> + Send
fn call( &self, request: TxReq, block_id: Option<BlockId>, state_overrides: Option<StateOverride>, block_overrides: Option<Box<BlockOverrides>>, ) -> impl Future<Output = RpcResult<Bytes>> + Send
Executes a new message call immediately without creating a transaction on the block chain.
Sourcefn get_code(
&self,
address: Address,
block_id: Option<BlockId>,
) -> impl Future<Output = RpcResult<Bytes>> + Send
fn get_code( &self, address: Address, block_id: Option<BlockId>, ) -> impl Future<Output = RpcResult<Bytes>> + Send
Returns code at a given address at given block number.
Sourcefn block_by_hash(
&self,
hash: B256,
full: bool,
) -> impl Future<Output = RpcResult<Option<B>>> + Send
fn block_by_hash( &self, hash: B256, full: bool, ) -> impl Future<Output = RpcResult<Option<B>>> + Send
Returns information about a block by hash.
Sourcefn block_by_number(
&self,
number: BlockNumberOrTag,
full: bool,
) -> impl Future<Output = RpcResult<Option<B>>> + Send
fn block_by_number( &self, number: BlockNumberOrTag, full: bool, ) -> impl Future<Output = RpcResult<Option<B>>> + Send
Returns information about a block by number.
Sourcefn block_receipts(
&self,
block_id: BlockId,
) -> impl Future<Output = RpcResult<Option<Vec<R>>>> + Send
fn block_receipts( &self, block_id: BlockId, ) -> impl Future<Output = RpcResult<Option<Vec<R>>>> + Send
Returns all transaction receipts for a given block.
Sourcefn raw_transaction_by_block_hash_and_index(
&self,
hash: B256,
index: Index,
) -> impl Future<Output = RpcResult<Option<Bytes>>> + Send
fn raw_transaction_by_block_hash_and_index( &self, hash: B256, index: Index, ) -> impl Future<Output = RpcResult<Option<Bytes>>> + Send
Returns the EIP-2718 encoded transaction by block hash and transaction index position.
Sourcefn raw_transaction_by_block_number_and_index(
&self,
number: BlockNumberOrTag,
index: Index,
) -> impl Future<Output = RpcResult<Option<Bytes>>> + Send
fn raw_transaction_by_block_number_and_index( &self, number: BlockNumberOrTag, index: Index, ) -> impl Future<Output = RpcResult<Option<Bytes>>> + Send
Returns the EIP-2718 encoded transaction by block number and transaction index position.
Sourcefn send_raw_transaction(
&self,
bytes: Bytes,
) -> impl Future<Output = RpcResult<B256>> + Send
fn send_raw_transaction( &self, bytes: Bytes, ) -> impl Future<Output = RpcResult<B256>> + Send
Sends signed transaction, returning its hash.
Sourcefn transaction_receipt(
&self,
hash: B256,
) -> impl Future<Output = RpcResult<Option<R>>> + Send
fn transaction_receipt( &self, hash: B256, ) -> impl Future<Output = RpcResult<Option<R>>> + Send
Returns the receipt of a transaction by transaction hash.
Sourcefn logs(&self, filter: Filter) -> impl Future<Output = RpcResult<Vec<L>>> + Send
fn logs(&self, filter: Filter) -> impl Future<Output = RpcResult<Vec<L>>> + Send
Returns logs matching given filter object.
Sourcefn get_proof(
&self,
address: Address,
keys: Vec<JsonStorageKey>,
block_number: Option<BlockId>,
) -> impl Future<Output = RpcResult<EIP1186AccountProofResponse>> + Send
fn get_proof( &self, address: Address, keys: Vec<JsonStorageKey>, block_number: Option<BlockId>, ) -> impl Future<Output = RpcResult<EIP1186AccountProofResponse>> + Send
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.
Sourcefn get_multi_proof(
&self,
targets: Vec<(Address, Vec<B256>)>,
block_number: Option<BlockId>,
) -> impl Future<Output = RpcResult<Vec<EIP1186AccountProofResponse>>> + Send
fn get_multi_proof( &self, targets: Vec<(Address, Vec<B256>)>, block_number: Option<BlockId>, ) -> impl Future<Output = RpcResult<Vec<EIP1186AccountProofResponse>>> + Send
Returns the account and storage values of the specified targets including Merkle proofs.
Sourcefn block_access_list_by_block_hash(
&self,
hash: B256,
) -> impl Future<Output = RpcResult<Option<BlockAccessList>>> + Send
fn block_access_list_by_block_hash( &self, hash: B256, ) -> impl Future<Output = RpcResult<Option<BlockAccessList>>> + Send
Returns the EIP-7928 block access list for a block by hash.
Sourcefn block_access_list_by_block_number(
&self,
number: BlockNumberOrTag,
) -> impl Future<Output = RpcResult<Option<BlockAccessList>>> + Send
fn block_access_list_by_block_number( &self, number: BlockNumberOrTag, ) -> impl Future<Output = RpcResult<Option<BlockAccessList>>> + Send
Returns the EIP-7928 block access list for a block by number.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".