pub struct EthApi { /* private fields */ }
Implementations§
source§impl EthApi
impl EthApi
pub fn new( config: RpcImplConfiguration, consensus: SharedConsensusGraph, sync: SharedSynchronizationService, tx_pool: SharedTransactionPool ) -> Self
pub fn consensus_graph(&self) -> &ConsensusGraph
pub fn tx_pool(&self) -> &SharedTransactionPool
pub fn fetch_block_by_height(&self, height: u64) -> Result<PhantomBlock, String>
pub fn fetch_block_by_hash(&self, hash: &H256) -> Result<PhantomBlock, String>
pub fn exec_transaction( &self, request: TransactionRequest, block_number_or_hash: Option<BlockNumber> ) -> CoreResult<(Executed, U256)>
pub fn send_transaction_with_signature( &self, tx: TransactionWithSignature ) -> CoreResult<H256>
pub fn construct_rpc_receipt( &self, b: &PhantomBlock, idx: usize, prior_log_index: &mut usize ) -> CoreResult<Receipt>
pub fn get_tx_from_txpool(&self, hash: H256) -> Option<Transaction>
pub fn get_block_receipts( &self, block_num: BlockNumber ) -> CoreResult<Vec<Receipt>>
pub fn block_tx_by_index( phantom_block: Option<PhantomBlock>, idx: usize ) -> Option<Transaction>
pub fn sync_status(&self) -> SyncStatus
pub fn chain_id(&self) -> u32
pub fn gas_price(&self) -> U256
pub fn latest_block_number(&self) -> CoreResult<U256>
pub fn best_epoch_number(&self) -> u64
pub fn user_balance( &self, address: H160, num: Option<BlockNumber> ) -> CoreResult<U256>
pub fn storage_at( &self, address: H160, position: U256, block_num: Option<BlockNumber> ) -> CoreResult<H256>
pub fn phantom_block_by_hash( &self, hash: H256 ) -> CoreResult<Option<PhantomBlock>>
pub fn phantom_block_by_number( &self, block_num: BlockNumber ) -> CoreResult<Option<PhantomBlock>>
pub fn block_by_hash( &self, hash: H256, include_txs: bool ) -> CoreResult<Option<Block>>
pub fn block_by_number( &self, block_num: BlockNumber, include_txs: bool ) -> CoreResult<Option<Block>>
pub fn next_nonce( &self, address: H160, num: Option<BlockNumber> ) -> CoreResult<U256>
pub fn block_transaction_count_by_hash( &self, hash: H256 ) -> CoreResult<Option<U256>>
pub fn block_transaction_count_by_number( &self, block_num: BlockNumber ) -> CoreResult<Option<U256>>
pub fn block_uncles_count_by_hash(&self, hash: H256) -> CoreResult<Option<U256>>
pub fn block_uncles_count_by_number( &self, block_num: BlockNumber ) -> CoreResult<Option<U256>>
pub fn code_at( &self, address: H160, epoch_num: Option<BlockNumber> ) -> CoreResult<Bytes>
pub fn fee_history( &self, block_count: HexU64, newest_block: BlockNumber, reward_percentiles: Option<Vec<f64>> ) -> CoreResult<FeeHistory>
pub fn transaction_by_hash(&self, hash: H256) -> CoreResult<Option<Transaction>>
pub fn transaction_receipt(&self, tx_hash: H256) -> CoreResult<Option<Receipt>>
pub fn logs(&self, filter: EthRpcLogFilter) -> CoreResult<Vec<Log>>
pub fn max_priority_fee_per_gas(&self) -> CoreResult<U256>
Trait Implementations§
source§impl BlockProvider for &EthApi
impl BlockProvider for &EthApi
fn get_block_epoch_number(&self, hash: &H256) -> Option<u64>
fn get_block_hashes_by_epoch( &self, epoch_number: EpochNumber ) -> Result<Vec<H256>, String>
source§impl EthApiServer for EthApi
impl EthApiServer for EthApi
source§fn protocol_version<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<U64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn protocol_version<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<U64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the protocol version encoded as a string.
source§fn syncing(&self) -> RpcResult<SyncStatus>
fn syncing(&self) -> RpcResult<SyncStatus>
Returns an object with data about the sync status or false.
Returns the client coinbase address.
source§fn block_number(&self) -> RpcResult<U256>
fn block_number(&self) -> RpcResult<U256>
Returns the number of most recent block.
source§fn chain_id<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn chain_id<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the chain ID of the current network.
source§fn block_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256,
full: bool
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256,
full: 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.
source§fn block_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber,
full: bool
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber,
full: 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.
source§fn block_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: 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.
source§fn block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber
) -> 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.
source§fn block_uncles_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_uncles_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the number of uncles in a block from a block matching the given block hash.
source§fn block_uncles_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_uncles_count_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber
) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the number of uncles in a block with given block number.
source§fn block_receipts<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<Receipt>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_receipts<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<Receipt>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns all transaction receipts for a given block.
source§fn uncle_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: H256,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn uncle_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: H256,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns an uncle block of the given block and index.
source§fn uncle_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn uncle_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns an uncle block of the given block and index.
source§fn raw_transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn raw_transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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.
source§fn transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the information about a transaction requested by transaction hash.
source§fn raw_transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: H256,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn raw_transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: H256,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information about a raw transaction by block hash and transaction index position.
source§fn transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: H256,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_by_block_hash_and_index<'life0, 'async_trait>(
&'life0 self,
hash: H256,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information about a transaction by block hash and transaction index position.
source§fn raw_transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn raw_transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information about a raw transaction by block number and transaction index position.
source§fn transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_by_block_number_and_index<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber,
index: Index
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information about a transaction by block number and transaction index position.
source§fn transaction_by_sender_and_nonce<'life0, 'async_trait>(
&'life0 self,
address: Address,
nonce: U64
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_by_sender_and_nonce<'life0, 'async_trait>(
&'life0 self,
address: Address,
nonce: U64
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information about a transaction by sender and nonce.
source§fn transaction_receipt<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Receipt>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_receipt<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Receipt>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the receipt of a transaction by transaction hash.
source§fn balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>
) -> 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.
source§fn storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
index: U256,
block_number: Option<BlockId>
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
index: U256,
block_number: Option<BlockId>
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the value from a storage position at a given address
source§fn transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>
) -> 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 at given block number.
source§fn get_code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block_number: Option<BlockId>
) -> 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_number: Option<BlockId>
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns code at a given address at given block number.
source§fn header_by_number<'life0, 'async_trait>(
&'life0 self,
hash: BlockNumber
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Header>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_by_number<'life0, 'async_trait>(
&'life0 self,
hash: BlockNumber
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Header>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the block’s header at given number.
source§fn header_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Header>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Header>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the block’s header at given hash.
source§fn call<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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.
Executes a new message call immediately without creating a transaction
on the block chain.
source§fn estimate_gas<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest,
block_number: Option<BlockId>
) -> 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,
request: TransactionRequest,
block_number: Option<BlockId>
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Simulate arbitrary number of transactions at an arbitrary blockchain index, with the optionality of state overrides 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. Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
source§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 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.
source§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 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 account details by specifying an address and a block number/tag Introduced in EIP-1559, returns suggestion for the priority for dynamic fee transactions.
source§fn fee_history<'life0, 'async_trait>(
&'life0 self,
block_count: U64,
newest_block: BlockNumber,
reward_percentiles: Option<Vec<f64>>
) -> Pin<Box<dyn Future<Output = RpcResult<FeeHistory>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fee_history<'life0, 'async_trait>(
&'life0 self,
block_count: U64,
newest_block: BlockNumber,
reward_percentiles: Option<Vec<f64>>
) -> Pin<Box<dyn Future<Output = RpcResult<FeeHistory>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Introduced in EIP-4844, returns the current blob base fee in wei. 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.
source§fn is_mining<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_mining<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns whether the client is actively mining new blocks.
source§fn hashrate<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn hashrate<'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 hashes per second that the node is mining with.
source§fn submit_hashrate<'life0, 'async_trait>(
&'life0 self,
hashrate: U256,
id: H256
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_hashrate<'life0, 'async_trait>(
&'life0 self,
hashrate: U256,
id: H256
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the hash of the current block, the seedHash, and the boundary condition to be met (“target”) 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.
source§fn submit_work<'life0, 'async_trait>(
&'life0 self,
nonce: H64,
pow_hash: H256,
mix_digest: H256
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_work<'life0, 'async_trait>(
&'life0 self,
nonce: H64,
pow_hash: H256,
mix_digest: H256
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Used for submitting a proof-of-work solution.
source§fn send_transaction<'life0, 'async_trait>(
&'life0 self,
request: TransactionRequest
) -> 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,
request: TransactionRequest
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends transaction; will block waiting for signer to return the transaction hash.
source§fn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
bytes: 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,
bytes: Bytes
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends signed transaction, returning its hash.
source§fn sign<'life0, 'async_trait>(
&'life0 self,
address: Address,
message: Bytes
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign<'life0, 'async_trait>(
&'life0 self,
address: Address,
message: Bytes
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns an Ethereum specific signature with: sign(keccak256(“\x19Ethereum Signed Message:\n”
- len(message) + message))).
source§fn sign_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: TransactionRequest
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: TransactionRequest
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Signs a transaction that can be submitted to the network at a later time
using with sendRawTransaction.
Auto Trait Implementations§
impl !RefUnwindSafe for EthApi
impl Send for EthApi
impl Sync for EthApi
impl Unpin for EthApi
impl !UnwindSafe for EthApi
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
source§impl<T> ElementSatisfy<ElementNoConstrain> for T
impl<T> ElementSatisfy<ElementNoConstrain> for T
fn to_constrain_object(&self) -> &ElementNoConstrain
fn to_constrain_object_mut(&mut self) -> &mut ElementNoConstrain
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.