pub trait EthRpcServer:
Sized
+ Send
+ Sync
+ 'static {
Show 28 methods
// Required methods
fn accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Address>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn call<'life0, 'async_trait>(
&'life0 self,
transaction: GenericTransaction,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn chain_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn estimate_gas<'life0, 'async_trait>(
&'life0 self,
transaction: GenericTransaction,
block: Option<BlockNumberOrTag>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_by_hash<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
hydrated_transactions: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
block: BlockNumberOrTag,
hydrated_transactions: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
block_hash: Option<H256>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
block: Option<BlockNumberOrTag>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_logs<'life0, 'async_trait>(
&'life0 self,
filter: Option<Filter>,
) -> Pin<Box<dyn Future<Output = RpcResult<FilterResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
storage_slot: U256,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
transaction_index: U256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
block: BlockNumberOrTag,
transaction_index: U256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
transaction_hash: H256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transaction_receipt<'life0, 'async_trait>(
&'life0 self,
transaction_hash: H256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<ReceiptInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn max_priority_fee_per_gas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: Bytes,
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: GenericTransaction,
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn syncing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<SyncingStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn net_listening<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn net_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn web3_client_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fee_history<'life0, 'async_trait>(
&'life0 self,
block_count: U256,
newest_block: BlockNumberOrTag,
reward_percentiles: Option<Vec<f64>>,
) -> Pin<Box<dyn Future<Output = RpcResult<FeeHistoryResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Server trait implementation for the EthRpc
RPC API.
Required Methods§
Sourcefn accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Address>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Address>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns a list of addresses owned by client.
Sourcefn block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the number of most recent block.
Sourcefn call<'life0, 'async_trait>(
&'life0 self,
transaction: GenericTransaction,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call<'life0, 'async_trait>(
&'life0 self,
transaction: GenericTransaction,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Executes a new message call immediately without creating a transaction on the block chain.
Sourcefn chain_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn chain_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the chain ID of the current network.
Sourcefn estimate_gas<'life0, 'async_trait>(
&'life0 self,
transaction: GenericTransaction,
block: Option<BlockNumberOrTag>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn estimate_gas<'life0, 'async_trait>(
&'life0 self,
transaction: GenericTransaction,
block: Option<BlockNumberOrTag>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
Sourcefn gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the current price per gas in wei.
Sourcefn get_balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the balance of the account of given address.
Sourcefn get_block_by_hash<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
hydrated_transactions: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_by_hash<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
hydrated_transactions: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information about a block by hash.
Sourcefn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
block: BlockNumberOrTag,
hydrated_transactions: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
block: BlockNumberOrTag,
hydrated_transactions: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information about a block by number.
Sourcefn get_block_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
block_hash: Option<H256>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
block_hash: Option<H256>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the number of transactions in a block from a block matching the given block hash.
Sourcefn get_block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
block: Option<BlockNumberOrTag>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
block: Option<BlockNumberOrTag>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the number of transactions in a block matching the given block number.
Sourcefn get_code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns code at a given address.
Sourcefn get_logs<'life0, 'async_trait>(
&'life0 self,
filter: Option<Filter>,
) -> Pin<Box<dyn Future<Output = RpcResult<FilterResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_logs<'life0, 'async_trait>(
&'life0 self,
filter: Option<Filter>,
) -> Pin<Box<dyn Future<Output = RpcResult<FilterResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns an array of all logs matching filter with given id.
Sourcefn get_storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
storage_slot: U256,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
storage_slot: U256,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the value from a storage position at a given address.
Sourcefn get_transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
transaction_index: U256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
transaction_index: U256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information about a transaction by block hash and transaction index position.
Sourcefn get_transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
block: BlockNumberOrTag,
transaction_index: U256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
block: BlockNumberOrTag,
transaction_index: U256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information about a transaction by block number and transaction index position.
Sourcefn get_transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
transaction_hash: H256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
transaction_hash: H256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the information about a transaction requested by transaction hash.
Sourcefn get_transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockNumberOrTagOrHash,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the number of transactions sent from an address.
Sourcefn get_transaction_receipt<'life0, 'async_trait>(
&'life0 self,
transaction_hash: H256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<ReceiptInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_receipt<'life0, 'async_trait>(
&'life0 self,
transaction_hash: H256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<ReceiptInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the receipt of a transaction by transaction hash.
Sourcefn max_priority_fee_per_gas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn max_priority_fee_per_gas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the current maxPriorityFeePerGas per gas in wei.
Sourcefn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: Bytes,
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: Bytes,
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submits a raw transaction. For EIP-4844 transactions, the raw form must be the network form. This means it includes the blobs, KZG commitments, and KZG proofs.
Sourcefn send_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: GenericTransaction,
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: GenericTransaction,
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Signs and submits a transaction.
Sourcefn syncing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<SyncingStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn syncing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<SyncingStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns an object with data about the sync status or false.
Sourcefn net_listening<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn net_listening<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns true when the client is actively listening for network connections, otherwise false
Sourcefn net_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn net_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The string value of current network id
Sourcefn web3_client_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn web3_client_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The string value of the current client version
Sourcefn fee_history<'life0, 'async_trait>(
&'life0 self,
block_count: U256,
newest_block: BlockNumberOrTag,
reward_percentiles: Option<Vec<f64>>,
) -> Pin<Box<dyn Future<Output = RpcResult<FeeHistoryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fee_history<'life0, 'async_trait>(
&'life0 self,
block_count: U256,
newest_block: BlockNumberOrTag,
reward_percentiles: Option<Vec<f64>>,
) -> Pin<Box<dyn Future<Output = RpcResult<FeeHistoryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range.
Transaction fee history, which is introduced in EIP-1159.
Provided Methods§
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.