pub trait EngineEthApiServer<TxReq, B, R, L>:
Sized
+ Send
+ Sync
+ 'staticwhere
TxReq: RpcObject,
B: RpcObject,
R: RpcObject,
L: RpcObject,{
Show 20 methods
// Required methods
fn syncing(&self) -> Result<SyncStatus, ErrorObject<'static>>;
fn chain_id(
&self,
) -> impl Future<Output = Result<Option<Uint<64, 1>>, ErrorObject<'static>>> + Send;
fn block_number(&self) -> Result<Uint<256, 4>, ErrorObject<'static>>;
fn call(
&self,
request: TxReq,
block_id: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> impl Future<Output = Result<Bytes, ErrorObject<'static>>> + Send;
fn get_code(
&self,
address: Address,
block_id: Option<BlockId>,
) -> impl Future<Output = Result<Bytes, ErrorObject<'static>>> + Send;
fn block_by_hash(
&self,
hash: FixedBytes<32>,
full: bool,
) -> impl Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send;
fn block_by_number(
&self,
number: BlockNumberOrTag,
full: bool,
) -> impl Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send;
fn block_receipts(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<Vec<R>>, ErrorObject<'static>>> + Send;
fn raw_transaction_by_block_hash_and_index(
&self,
hash: FixedBytes<32>,
index: Index,
) -> impl Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send;
fn raw_transaction_by_block_number_and_index(
&self,
number: BlockNumberOrTag,
index: Index,
) -> impl Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send;
fn send_raw_transaction(
&self,
bytes: Bytes,
) -> impl Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send;
fn transaction_receipt(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<R>, ErrorObject<'static>>> + Send;
fn logs(
&self,
filter: Filter,
) -> impl Future<Output = Result<Vec<L>, ErrorObject<'static>>> + Send;
fn get_proof(
&self,
address: Address,
keys: Vec<JsonStorageKey>,
block_number: Option<BlockId>,
) -> impl Future<Output = Result<EIP1186AccountProofResponse, ErrorObject<'static>>> + Send;
fn get_multi_proof(
&self,
targets: Vec<(Address, Vec<FixedBytes<32>>)>,
block_number: Option<BlockId>,
) -> impl Future<Output = Result<Vec<EIP1186AccountProofResponse>, ErrorObject<'static>>> + Send;
fn block_access_list_by_block_hash(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>> + Send;
fn block_access_list_by_block_number(
&self,
number: BlockNumberOrTag,
) -> impl Future<Output = Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>> + Send;
fn block_access_list(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>> + Send;
fn block_access_list_raw(
&self,
block: BlockId,
) -> impl Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + 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 { ... }
}rpc only.Expand description
Server trait implementation for the EngineEthApi RPC API.
Required Methods§
Sourcefn syncing(&self) -> Result<SyncStatus, ErrorObject<'static>>
fn syncing(&self) -> Result<SyncStatus, ErrorObject<'static>>
Returns an object with data about the sync status or false.
Sourcefn chain_id(
&self,
) -> impl Future<Output = Result<Option<Uint<64, 1>>, ErrorObject<'static>>> + Send
fn chain_id( &self, ) -> impl Future<Output = Result<Option<Uint<64, 1>>, ErrorObject<'static>>> + Send
Returns the chain ID of the current network.
Sourcefn block_number(&self) -> Result<Uint<256, 4>, ErrorObject<'static>>
fn block_number(&self) -> Result<Uint<256, 4>, ErrorObject<'static>>
Returns the number of most recent block.
Sourcefn call(
&self,
request: TxReq,
block_id: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> impl Future<Output = Result<Bytes, ErrorObject<'static>>> + Send
fn call( &self, request: TxReq, block_id: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, block_overrides: Option<Box<BlockOverrides>>, ) -> impl Future<Output = Result<Bytes, ErrorObject<'static>>> + 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 = Result<Bytes, ErrorObject<'static>>> + Send
fn get_code( &self, address: Address, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Bytes, ErrorObject<'static>>> + Send
Returns code at a given address at given block number.
Sourcefn block_by_hash(
&self,
hash: FixedBytes<32>,
full: bool,
) -> impl Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send
fn block_by_hash( &self, hash: FixedBytes<32>, full: bool, ) -> impl Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send
Returns information about a block by hash.
Sourcefn block_by_number(
&self,
number: BlockNumberOrTag,
full: bool,
) -> impl Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send
fn block_by_number( &self, number: BlockNumberOrTag, full: bool, ) -> impl Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send
Returns information about a block by number.
Sourcefn block_receipts(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<Vec<R>>, ErrorObject<'static>>> + Send
fn block_receipts( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<Vec<R>>, ErrorObject<'static>>> + Send
Returns all transaction receipts for a given block.
Sourcefn raw_transaction_by_block_hash_and_index(
&self,
hash: FixedBytes<32>,
index: Index,
) -> impl Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send
fn raw_transaction_by_block_hash_and_index( &self, hash: FixedBytes<32>, index: Index, ) -> impl Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + 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 = Result<Option<Bytes>, ErrorObject<'static>>> + Send
fn raw_transaction_by_block_number_and_index( &self, number: BlockNumberOrTag, index: Index, ) -> impl Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send
Returns the EIP-2718 encoded transaction by block number and transaction index position.
Sourcefn send_raw_transaction(
&self,
bytes: Bytes,
) -> impl Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send
fn send_raw_transaction( &self, bytes: Bytes, ) -> impl Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send
Sends signed transaction, returning its hash.
Sourcefn transaction_receipt(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<R>, ErrorObject<'static>>> + Send
fn transaction_receipt( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<R>, ErrorObject<'static>>> + Send
Returns the receipt of a transaction by transaction hash.
Sourcefn logs(
&self,
filter: Filter,
) -> impl Future<Output = Result<Vec<L>, ErrorObject<'static>>> + Send
fn logs( &self, filter: Filter, ) -> impl Future<Output = Result<Vec<L>, ErrorObject<'static>>> + Send
Returns logs matching given filter object.
Sourcefn get_proof(
&self,
address: Address,
keys: Vec<JsonStorageKey>,
block_number: Option<BlockId>,
) -> impl Future<Output = Result<EIP1186AccountProofResponse, ErrorObject<'static>>> + Send
fn get_proof( &self, address: Address, keys: Vec<JsonStorageKey>, block_number: Option<BlockId>, ) -> impl Future<Output = Result<EIP1186AccountProofResponse, ErrorObject<'static>>> + 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<FixedBytes<32>>)>,
block_number: Option<BlockId>,
) -> impl Future<Output = Result<Vec<EIP1186AccountProofResponse>, ErrorObject<'static>>> + Send
fn get_multi_proof( &self, targets: Vec<(Address, Vec<FixedBytes<32>>)>, block_number: Option<BlockId>, ) -> impl Future<Output = Result<Vec<EIP1186AccountProofResponse>, ErrorObject<'static>>> + Send
Returns the account and storage values of the specified targets including Merkle proofs.
Sourcefn block_access_list_by_block_hash(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>> + Send
fn block_access_list_by_block_hash( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>> + 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 = Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>> + Send
fn block_access_list_by_block_number( &self, number: BlockNumberOrTag, ) -> impl Future<Output = Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>> + Send
Returns the EIP-7928 block access list for a block by number.
Sourcefn block_access_list(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>> + Send
fn block_access_list( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>> + Send
Returns the EIP-7928 block access list for a block by block id.
Sourcefn block_access_list_raw(
&self,
block: BlockId,
) -> impl Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send
fn block_access_list_raw( &self, block: BlockId, ) -> impl Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send
Returns the EIP-7928 block access list bytes 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".