pub struct Eth<T> { /* private fields */ }
Expand description
Eth
namespace
Implementations§
Source§impl<T: Transport> Eth<T>
impl<T: Transport> Eth<T>
Sourcepub fn accounts(&self, options: CallOptions) -> CallFuture<Vec<Address>, T::Out> ⓘ
pub fn accounts(&self, options: CallOptions) -> CallFuture<Vec<Address>, T::Out> ⓘ
Get list of available accounts.
Sourcepub fn block_number(&self, options: CallOptions) -> CallFuture<U64, T::Out> ⓘ
pub fn block_number(&self, options: CallOptions) -> CallFuture<U64, T::Out> ⓘ
Get current block number
Sourcepub fn call(
&self,
req: CallRequest,
block: Option<BlockId>,
options: CallOptions,
) -> CallFuture<Bytes, T::Out> ⓘ
pub fn call( &self, req: CallRequest, block: Option<BlockId>, options: CallOptions, ) -> CallFuture<Bytes, T::Out> ⓘ
Call a constant method of contract without changing the state of the blockchain.
Sourcepub fn coinbase(&self, options: CallOptions) -> CallFuture<Address, T::Out> ⓘ
pub fn coinbase(&self, options: CallOptions) -> CallFuture<Address, T::Out> ⓘ
Get coinbase address
Sourcepub fn compile_lll(
&self,
code: String,
options: CallOptions,
) -> CallFuture<Bytes, T::Out> ⓘ
pub fn compile_lll( &self, code: String, options: CallOptions, ) -> CallFuture<Bytes, T::Out> ⓘ
Compile LLL
Sourcepub fn compile_solidity(
&self,
code: String,
options: CallOptions,
) -> CallFuture<Bytes, T::Out> ⓘ
pub fn compile_solidity( &self, code: String, options: CallOptions, ) -> CallFuture<Bytes, T::Out> ⓘ
Compile Solidity
Sourcepub fn compile_serpent(
&self,
code: String,
options: CallOptions,
) -> CallFuture<Bytes, T::Out> ⓘ
pub fn compile_serpent( &self, code: String, options: CallOptions, ) -> CallFuture<Bytes, T::Out> ⓘ
Compile Serpent
Sourcepub fn estimate_gas(
&self,
req: CallRequest,
block: Option<BlockNumber>,
options: CallOptions,
) -> CallFuture<U256, T::Out> ⓘ
pub fn estimate_gas( &self, req: CallRequest, block: Option<BlockNumber>, options: CallOptions, ) -> CallFuture<U256, T::Out> ⓘ
Call a contract without changing the state of the blockchain to estimate gas usage.
pub fn max_priority_fee_per_gas( &self, options: CallOptions, ) -> CallFuture<U256, T::Out> ⓘ
Sourcepub fn gas_price(&self, options: CallOptions) -> CallFuture<U256, T::Out> ⓘ
pub fn gas_price(&self, options: CallOptions) -> CallFuture<U256, T::Out> ⓘ
Get current recommended gas price
Sourcepub fn fee_history(
&self,
block_count: U256,
newest_block: BlockNumber,
reward_percentiles: Option<Vec<f64>>,
options: CallOptions,
) -> CallFuture<FeeHistory, T::Out> ⓘ
pub fn fee_history( &self, block_count: U256, newest_block: BlockNumber, reward_percentiles: Option<Vec<f64>>, options: CallOptions, ) -> CallFuture<FeeHistory, T::Out> ⓘ
Returns a collection of historical gas information. This can be used for evaluating the max_fee_per_gas and max_priority_fee_per_gas to send the future transactions.
Sourcepub fn balance(
&self,
address: Address,
block: Option<BlockNumber>,
options: CallOptions,
) -> CallFuture<U256, T::Out> ⓘ
pub fn balance( &self, address: Address, block: Option<BlockNumber>, options: CallOptions, ) -> CallFuture<U256, T::Out> ⓘ
Get balance of given address
Sourcepub fn logs(
&self,
filter: Filter,
options: CallOptions,
) -> CallFuture<Vec<Log>, T::Out> ⓘ
pub fn logs( &self, filter: Filter, options: CallOptions, ) -> CallFuture<Vec<Log>, T::Out> ⓘ
Get all logs matching a given filter object
Sourcepub fn block(
&self,
block: BlockId,
options: CallOptions,
) -> CallFuture<Option<Block<H256>>, T::Out> ⓘ
pub fn block( &self, block: BlockId, options: CallOptions, ) -> CallFuture<Option<Block<H256>>, T::Out> ⓘ
Get block details with transaction hashes.
Sourcepub fn block_with_txs(
&self,
block: BlockId,
options: CallOptions,
) -> CallFuture<Option<Block<Transaction>>, T::Out> ⓘ
pub fn block_with_txs( &self, block: BlockId, options: CallOptions, ) -> CallFuture<Option<Block<Transaction>>, T::Out> ⓘ
Get block details with full transaction objects.
Sourcepub fn block_transaction_count(
&self,
block: BlockId,
options: CallOptions,
) -> CallFuture<Option<U256>, T::Out> ⓘ
pub fn block_transaction_count( &self, block: BlockId, options: CallOptions, ) -> CallFuture<Option<U256>, T::Out> ⓘ
Get number of transactions in block
Sourcepub fn code(
&self,
address: Address,
block: Option<BlockNumber>,
options: CallOptions,
) -> CallFuture<Bytes, T::Out> ⓘ
pub fn code( &self, address: Address, block: Option<BlockNumber>, options: CallOptions, ) -> CallFuture<Bytes, T::Out> ⓘ
Get code under given address
Sourcepub fn compilers(&self, options: CallOptions) -> CallFuture<Vec<String>, T::Out> ⓘ
pub fn compilers(&self, options: CallOptions) -> CallFuture<Vec<String>, T::Out> ⓘ
Get supported compilers
Sourcepub fn chain_id(&self, options: CallOptions) -> CallFuture<U256, T::Out> ⓘ
pub fn chain_id(&self, options: CallOptions) -> CallFuture<U256, T::Out> ⓘ
Get chain id
Sourcepub fn request_accounts(
&self,
options: CallOptions,
) -> CallFuture<Vec<Address>, T::Out> ⓘ
pub fn request_accounts( &self, options: CallOptions, ) -> CallFuture<Vec<Address>, T::Out> ⓘ
Get available user accounts. This method is only available in the browser. With MetaMask, this will cause the popup that prompts the user to allow or deny access to their accounts to your app.
Sourcepub fn storage(
&self,
address: Address,
idx: U256,
block: Option<BlockNumber>,
options: CallOptions,
) -> CallFuture<H256, T::Out> ⓘ
pub fn storage( &self, address: Address, idx: U256, block: Option<BlockNumber>, options: CallOptions, ) -> CallFuture<H256, T::Out> ⓘ
Get storage entry
Sourcepub fn transaction_count(
&self,
address: Address,
block: Option<BlockNumber>,
options: CallOptions,
) -> CallFuture<U256, T::Out> ⓘ
pub fn transaction_count( &self, address: Address, block: Option<BlockNumber>, options: CallOptions, ) -> CallFuture<U256, T::Out> ⓘ
Get nonce
Sourcepub fn transaction(
&self,
id: TransactionId,
options: CallOptions,
) -> CallFuture<Option<Transaction>, T::Out> ⓘ
pub fn transaction( &self, id: TransactionId, options: CallOptions, ) -> CallFuture<Option<Transaction>, T::Out> ⓘ
Get transaction
Sourcepub fn transaction_receipt(
&self,
hash: H256,
options: CallOptions,
) -> CallFuture<Option<TransactionReceipt>, T::Out> ⓘ
pub fn transaction_receipt( &self, hash: H256, options: CallOptions, ) -> CallFuture<Option<TransactionReceipt>, T::Out> ⓘ
Get transaction receipt
Sourcepub fn uncle_header(
&self,
block: BlockId,
index: Index,
options: CallOptions,
) -> CallFuture<Option<BlockHeader>, T::Out> ⓘ
pub fn uncle_header( &self, block: BlockId, index: Index, options: CallOptions, ) -> CallFuture<Option<BlockHeader>, T::Out> ⓘ
Get uncle header by block ID and uncle index.
This method is meant for TurboGeth compatiblity, which is missing transaction hashes in the response.
Sourcepub fn uncle(
&self,
block: BlockId,
index: Index,
options: CallOptions,
) -> CallFuture<Option<Block<H256>>, T::Out> ⓘ
pub fn uncle( &self, block: BlockId, index: Index, options: CallOptions, ) -> CallFuture<Option<Block<H256>>, T::Out> ⓘ
Get uncle by block ID and uncle index – transactions only has hashes.
Sourcepub fn uncle_count(
&self,
block: BlockId,
options: CallOptions,
) -> CallFuture<Option<U256>, T::Out> ⓘ
pub fn uncle_count( &self, block: BlockId, options: CallOptions, ) -> CallFuture<Option<U256>, T::Out> ⓘ
Get uncle count in block
Sourcepub fn work(&self, options: CallOptions) -> CallFuture<Work, T::Out> ⓘ
pub fn work(&self, options: CallOptions) -> CallFuture<Work, T::Out> ⓘ
Get work package
Sourcepub fn hashrate(&self, options: CallOptions) -> CallFuture<U256, T::Out> ⓘ
pub fn hashrate(&self, options: CallOptions) -> CallFuture<U256, T::Out> ⓘ
Get hash rate
Sourcepub fn mining(&self, options: CallOptions) -> CallFuture<bool, T::Out> ⓘ
pub fn mining(&self, options: CallOptions) -> CallFuture<bool, T::Out> ⓘ
Get mining status
Sourcepub fn new_block_filter(&self, options: CallOptions) -> CallFuture<U256, T::Out> ⓘ
pub fn new_block_filter(&self, options: CallOptions) -> CallFuture<U256, T::Out> ⓘ
Start new block filter
Sourcepub fn new_pending_transaction_filter(
&self,
options: CallOptions,
) -> CallFuture<U256, T::Out> ⓘ
pub fn new_pending_transaction_filter( &self, options: CallOptions, ) -> CallFuture<U256, T::Out> ⓘ
Start new pending transaction filter
Sourcepub fn protocol_version(
&self,
options: CallOptions,
) -> CallFuture<String, T::Out> ⓘ
pub fn protocol_version( &self, options: CallOptions, ) -> CallFuture<String, T::Out> ⓘ
Start new pending transaction filter
Sourcepub fn send_raw_transaction(
&self,
rlp: Bytes,
options: CallOptions,
) -> CallFuture<H256, T::Out> ⓘ
pub fn send_raw_transaction( &self, rlp: Bytes, options: CallOptions, ) -> CallFuture<H256, T::Out> ⓘ
Sends a rlp-encoded signed transaction
Sourcepub fn send_transaction(
&self,
tx: TransactionRequest,
options: CallOptions,
) -> CallFuture<H256, T::Out> ⓘ
pub fn send_transaction( &self, tx: TransactionRequest, options: CallOptions, ) -> CallFuture<H256, T::Out> ⓘ
Sends a transaction transaction
Sourcepub fn sign(
&self,
address: Address,
data: Bytes,
options: CallOptions,
) -> CallFuture<H520, T::Out> ⓘ
pub fn sign( &self, address: Address, data: Bytes, options: CallOptions, ) -> CallFuture<H520, T::Out> ⓘ
Signs a hash of given data
Sourcepub fn submit_hashrate(
&self,
rate: U256,
id: H256,
options: CallOptions,
) -> CallFuture<bool, T::Out> ⓘ
pub fn submit_hashrate( &self, rate: U256, id: H256, options: CallOptions, ) -> CallFuture<bool, T::Out> ⓘ
Submit hashrate of external miner
Sourcepub fn submit_work(
&self,
nonce: H64,
pow_hash: H256,
mix_hash: H256,
options: CallOptions,
) -> CallFuture<bool, T::Out> ⓘ
pub fn submit_work( &self, nonce: H64, pow_hash: H256, mix_hash: H256, options: CallOptions, ) -> CallFuture<bool, T::Out> ⓘ
Submit work of external miner
Sourcepub fn syncing(&self, options: CallOptions) -> CallFuture<SyncState, T::Out> ⓘ
pub fn syncing(&self, options: CallOptions) -> CallFuture<SyncState, T::Out> ⓘ
Get syncing status
Sourcepub fn proof(
&self,
address: Address,
keys: Vec<U256>,
block: Option<BlockNumber>,
options: CallOptions,
) -> CallFuture<Option<Proof>, T::Out> ⓘ
pub fn proof( &self, address: Address, keys: Vec<U256>, block: Option<BlockNumber>, options: CallOptions, ) -> CallFuture<Option<Proof>, T::Out> ⓘ
Returns the account- and storage-values of the specified account including the Merkle-proof.