Trait reth::rpc::eth::EthApiServer
source · pub trait EthApiServer<T, B, R>:
Sized
+ Send
+ Sync
+ 'staticwhere
T: RpcObject,
B: RpcObject,
R: RpcObject,{
Show 51 methods
// Required methods
fn protocol_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<64, 1>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn syncing(&self) -> Result<SyncStatus, ErrorObject<'static>>;
fn author<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Address, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn accounts(&self) -> Result<Vec<Address>, ErrorObject<'static>>;
fn block_number(&self) -> Result<Uint<256, 4>, 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_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_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn block_uncles_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn block_uncles_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, 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 uncle_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn uncle_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn raw_transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn raw_transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn raw_transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn transaction_by_sender_and_nonce<'life0, 'async_trait>(
&'life0 self,
address: Address,
nonce: Uint<64, 1>,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, 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 balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
index: JsonStorageKey,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn header_by_number<'life0, 'async_trait>(
&'life0 self,
hash: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = Result<Option<Header>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn header_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Header>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn simulate_v1<'life0, 'async_trait>(
&'life0 self,
opts: SimBlock,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SimulatedBlock>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn call<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride>>,
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 call_many<'life0, 'async_trait>(
&'life0 self,
bundle: Bundle,
state_context: Option<StateContext>,
state_override: Option<HashMap<Address, AccountOverride>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<EthCallResponse>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn create_access_list<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<AccessListResult, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn estimate_gas<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_override: Option<HashMap<Address, AccountOverride>>,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_account<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockId,
) -> Pin<Box<dyn Future<Output = Result<Option<Account>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn max_priority_fee_per_gas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn blob_base_fee<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn fee_history<'life0, 'async_trait>(
&'life0 self,
block_count: Uint<64, 1>,
newest_block: BlockNumberOrTag,
reward_percentiles: Option<Vec<f64>>,
) -> Pin<Box<dyn Future<Output = Result<FeeHistory, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn is_mining<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn hashrate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_work<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Work, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn submit_hashrate<'life0, 'async_trait>(
&'life0 self,
hashrate: Uint<256, 4>,
id: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn submit_work<'life0, 'async_trait>(
&'life0 self,
nonce: FixedBytes<8>,
pow_hash: FixedBytes<32>,
mix_digest: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn send_transaction<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, 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 sign<'life0, 'async_trait>(
&'life0 self,
address: Address,
message: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn sign_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn sign_typed_data<'life0, 'async_trait>(
&'life0 self,
address: Address,
data: TypedData,
) -> Pin<Box<dyn Future<Output = Result<Bytes, 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 T: Send + Sync + 'static + Clone + Serialize,
B: Send + Sync + 'static + Clone + Serialize,
R: Send + Sync + 'static + Clone + Serialize { ... }
}
Expand description
Server trait implementation for the EthApi
RPC API.
Required Methods§
sourcefn protocol_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<64, 1>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn protocol_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<64, 1>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the protocol version encoded as a string.
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.
Returns the client coinbase address.
sourcefn accounts(&self) -> Result<Vec<Address>, ErrorObject<'static>>
fn accounts(&self) -> Result<Vec<Address>, ErrorObject<'static>>
Returns a list of addresses owned by client.
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 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 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.
sourcefn 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_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.
sourcefn 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_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.
sourcefn block_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn block_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the number of transactions in a block from a block matching the given block hash.
sourcefn block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the number of transactions in a block matching the given block number.
sourcefn block_uncles_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn block_uncles_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the number of uncles in a block from a block matching the given block hash.
sourcefn block_uncles_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn block_uncles_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the number of uncles in a block with given block number.
sourcefn 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 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.
sourcefn uncle_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn uncle_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns an uncle block of the given block and index.
sourcefn uncle_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn uncle_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<B>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns an uncle block of the given block and index.
sourcefn raw_transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn raw_transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the EIP-2718 encoded transaction if it exists.
If this is a EIP-4844 transaction that is in the pool it will include the sidecar.
sourcefn transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the information about a transaction requested by transaction hash.
sourcefn raw_transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn raw_transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns information about a raw transaction by block hash and transaction index position.
sourcefn transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns information about a transaction by block hash and transaction index position.
sourcefn raw_transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn raw_transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns information about a raw transaction by block number and transaction index position.
sourcefn transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
index: Index,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns information about a transaction by block number and transaction index position.
sourcefn transaction_by_sender_and_nonce<'life0, 'async_trait>(
&'life0 self,
address: Address,
nonce: Uint<64, 1>,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn transaction_by_sender_and_nonce<'life0, 'async_trait>(
&'life0 self,
address: Address,
nonce: Uint<64, 1>,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns information about a transaction by sender and nonce.
sourcefn 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 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.
sourcefn balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the balance of the account of given address.
sourcefn storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
index: JsonStorageKey,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
index: JsonStorageKey,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the value from a storage position at a given address
sourcefn transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the number of transactions sent from an address at given block number.
sourcefn get_code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>,
) -> 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_number: 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.
sourcefn header_by_number<'life0, 'async_trait>(
&'life0 self,
hash: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = Result<Option<Header>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn header_by_number<'life0, 'async_trait>(
&'life0 self,
hash: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = Result<Option<Header>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the block’s header at given number.
sourcefn header_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Header>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn header_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Header>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the block’s header at given hash.
sourcefn simulate_v1<'life0, 'async_trait>(
&'life0 self,
opts: SimBlock,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SimulatedBlock>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn simulate_v1<'life0, 'async_trait>(
&'life0 self,
opts: SimBlock,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SimulatedBlock>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
eth_simulateV1
executes an arbitrary number of transactions on top of the requested state.
The transactions are packed into individual blocks. Overrides can be provided.
sourcefn call<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride>>,
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 call<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride>>,
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.
sourcefn call_many<'life0, 'async_trait>(
&'life0 self,
bundle: Bundle,
state_context: Option<StateContext>,
state_override: Option<HashMap<Address, AccountOverride>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<EthCallResponse>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn call_many<'life0, 'async_trait>(
&'life0 self,
bundle: Bundle,
state_context: Option<StateContext>,
state_override: Option<HashMap<Address, AccountOverride>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<EthCallResponse>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Simulate arbitrary number of transactions at an arbitrary blockchain index, with the optionality of state overrides
sourcefn create_access_list<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<AccessListResult, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn create_access_list<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<AccessListResult, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Generates an access list for a transaction.
This method creates an EIP2930 type accessList based on a given Transaction.
An access list contains all storage slots and addresses touched by the transaction, except for the sender account and the chain’s precompiles.
It returns list of addresses and storage keys used by the transaction, plus the gas consumed when the access list is added. That is, it gives you the list of addresses and storage keys that will be used by that transaction, plus the gas consumed if the access list is included. Like eth_estimateGas, this is an estimation; the list could change when the transaction is actually mined. Adding an accessList to your transaction does not necessary result in lower gas usage compared to a transaction without an access list.
sourcefn estimate_gas<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_override: Option<HashMap<Address, AccountOverride>>,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn estimate_gas<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>,
state_override: Option<HashMap<Address, AccountOverride>>,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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 = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the current price per gas in wei.
sourcefn get_account<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockId,
) -> Pin<Box<dyn Future<Output = Result<Option<Account>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_account<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockId,
) -> Pin<Box<dyn Future<Output = Result<Option<Account>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the account details by specifying an address and a block number/tag
sourcefn max_priority_fee_per_gas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn max_priority_fee_per_gas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Introduced in EIP-1559, returns suggestion for the priority for dynamic fee transactions.
sourcefn blob_base_fee<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn blob_base_fee<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Introduced in EIP-4844, returns the current blob base fee in wei.
sourcefn fee_history<'life0, 'async_trait>(
&'life0 self,
block_count: Uint<64, 1>,
newest_block: BlockNumberOrTag,
reward_percentiles: Option<Vec<f64>>,
) -> Pin<Box<dyn Future<Output = Result<FeeHistory, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn fee_history<'life0, 'async_trait>(
&'life0 self,
block_count: Uint<64, 1>,
newest_block: BlockNumberOrTag,
reward_percentiles: Option<Vec<f64>>,
) -> Pin<Box<dyn Future<Output = Result<FeeHistory, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the Transaction fee history
Introduced in EIP-1559 for getting information on the appropriate priority fee to use.
Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range. The returned Fee history for the returned block range can be a subsection of the requested range if not all blocks are available.
sourcefn is_mining<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn is_mining<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns whether the client is actively mining new blocks.
sourcefn hashrate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn hashrate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the number of hashes per second that the node is mining with.
sourcefn get_work<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Work, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_work<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Work, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the hash of the current block, the seedHash, and the boundary condition to be met (“target”)
sourcefn submit_hashrate<'life0, 'async_trait>(
&'life0 self,
hashrate: Uint<256, 4>,
id: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn submit_hashrate<'life0, 'async_trait>(
&'life0 self,
hashrate: Uint<256, 4>,
id: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Used for submitting mining hashrate.
Can be used for remote miners to submit their hash rate.
It accepts the miner hash rate and an identifier which must be unique between nodes.
Returns true
if the block was successfully submitted, false
otherwise.
sourcefn submit_work<'life0, 'async_trait>(
&'life0 self,
nonce: FixedBytes<8>,
pow_hash: FixedBytes<32>,
mix_digest: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn submit_work<'life0, 'async_trait>(
&'life0 self,
nonce: FixedBytes<8>,
pow_hash: FixedBytes<32>,
mix_digest: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Used for submitting a proof-of-work solution.
sourcefn send_transaction<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn send_transaction<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Sends transaction; will block waiting for signer to return the transaction hash.
sourcefn 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 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.
sourcefn sign<'life0, 'async_trait>(
&'life0 self,
address: Address,
message: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn sign<'life0, 'async_trait>(
&'life0 self,
address: Address,
message: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns an Ethereum specific signature with: sign(keccak256(“\x19Ethereum Signed Message:\n”
- len(message) + message))).
sourcefn sign_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn sign_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Signs a transaction that can be submitted to the network at a later time using with
sendRawTransaction.
sourcefn sign_typed_data<'life0, 'async_trait>(
&'life0 self,
address: Address,
data: TypedData,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn sign_typed_data<'life0, 'async_trait>(
&'life0 self,
address: Address,
data: TypedData,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Signs data via EIP-712.
sourcefn 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,
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.