pub trait EngineEthApiClient<B, R>: ClientTwhere
B: RpcObject + Send + Sync + 'static + DeserializeOwned,
R: RpcObject + Send + Sync + 'static + DeserializeOwned,{
// Provided methods
fn syncing(&self) -> impl Future<Output = Result<SyncStatus, Error>> + Send { ... }
fn chain_id(
&self,
) -> impl Future<Output = Result<Option<Uint<64, 1>>, Error>> + Send { ... }
fn block_number(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Error>> + Send { ... }
fn call(
&self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> impl Future<Output = Result<Bytes, Error>> + Send { ... }
fn get_code(
&self,
address: Address,
block_id: Option<BlockId>,
) -> impl Future<Output = Result<Bytes, Error>> + Send { ... }
fn block_by_hash(
&self,
hash: FixedBytes<32>,
full: bool,
) -> impl Future<Output = Result<Option<B>, Error>> + Send { ... }
fn block_by_number(
&self,
number: BlockNumberOrTag,
full: bool,
) -> impl Future<Output = Result<Option<B>, Error>> + Send { ... }
fn block_receipts(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<Vec<R>>, Error>> + Send { ... }
fn send_raw_transaction(
&self,
bytes: Bytes,
) -> impl Future<Output = Result<FixedBytes<32>, Error>> + Send { ... }
fn transaction_receipt(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<R>, Error>> + Send { ... }
fn logs(
&self,
filter: Filter,
) -> impl Future<Output = Result<Vec<Log>, Error>> + Send { ... }
fn get_proof(
&self,
address: Address,
keys: Vec<JsonStorageKey>,
block_number: Option<BlockId>,
) -> impl Future<Output = Result<EIP1186AccountProofResponse, Error>> + Send { ... }
}
Expand description
Client implementation for the EngineEthApi
RPC API.
Provided Methods§
Sourcefn syncing(&self) -> impl Future<Output = Result<SyncStatus, Error>> + Send
fn syncing(&self) -> impl Future<Output = Result<SyncStatus, Error>> + Send
Returns an object with data about the sync status or false.
Sourcefn chain_id(
&self,
) -> impl Future<Output = Result<Option<Uint<64, 1>>, Error>> + Send
fn chain_id( &self, ) -> impl Future<Output = Result<Option<Uint<64, 1>>, Error>> + Send
Returns the chain ID of the current network.
Sourcefn block_number(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Error>> + Send
fn block_number( &self, ) -> impl Future<Output = Result<Uint<256, 4>, Error>> + Send
Returns the number of most recent block.
Sourcefn call(
&self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> impl Future<Output = Result<Bytes, Error>> + Send
fn call( &self, request: TransactionRequest, block_number: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, block_overrides: Option<Box<BlockOverrides>>, ) -> impl Future<Output = Result<Bytes, Error>> + 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, Error>> + Send
fn get_code( &self, address: Address, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Bytes, Error>> + 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>, Error>> + Send
fn block_by_hash( &self, hash: FixedBytes<32>, full: bool, ) -> impl Future<Output = Result<Option<B>, Error>> + Send
Returns information about a block by hash.
Sourcefn block_by_number(
&self,
number: BlockNumberOrTag,
full: bool,
) -> impl Future<Output = Result<Option<B>, Error>> + Send
fn block_by_number( &self, number: BlockNumberOrTag, full: bool, ) -> impl Future<Output = Result<Option<B>, Error>> + Send
Returns information about a block by number.
Sourcefn block_receipts(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<Vec<R>>, Error>> + Send
fn block_receipts( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<Vec<R>>, Error>> + Send
Returns all transaction receipts for a given block.
Sourcefn send_raw_transaction(
&self,
bytes: Bytes,
) -> impl Future<Output = Result<FixedBytes<32>, Error>> + Send
fn send_raw_transaction( &self, bytes: Bytes, ) -> impl Future<Output = Result<FixedBytes<32>, Error>> + Send
Sends signed transaction, returning its hash.
Sourcefn transaction_receipt(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<R>, Error>> + Send
fn transaction_receipt( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<R>, Error>> + Send
Returns the receipt of a transaction by transaction hash.
Sourcefn logs(
&self,
filter: Filter,
) -> impl Future<Output = Result<Vec<Log>, Error>> + Send
fn logs( &self, filter: Filter, ) -> impl Future<Output = Result<Vec<Log>, Error>> + 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, Error>> + Send
fn get_proof( &self, address: Address, keys: Vec<JsonStorageKey>, block_number: Option<BlockId>, ) -> impl Future<Output = Result<EIP1186AccountProofResponse, Error>> + 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.
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.