Struct parity_rpc::v1::EthClient
source · [−]pub struct EthClient<C, SN: ?Sized, S: ?Sized, M, EM> where
C: BlockChainClient + BlockChainClient,
SN: SnapshotService,
S: SyncProvider,
M: MinerService,
EM: ExternalMinerService, { /* private fields */ }
Expand description
Eth rpc implementation.
Implementations
sourceimpl<C, SN: ?Sized, S: ?Sized, M, EM, T: StateInfo + 'static> EthClient<C, SN, S, M, EM> where
C: BlockChainClient + BlockChainClient + StateClient<State = T> + Call<State = T> + EngineInfo,
SN: SnapshotService,
S: SyncProvider,
M: MinerService<State = T>,
EM: ExternalMinerService,
impl<C, SN: ?Sized, S: ?Sized, M, EM, T: StateInfo + 'static> EthClient<C, SN, S, M, EM> where
C: BlockChainClient + BlockChainClient + StateClient<State = T> + Call<State = T> + EngineInfo,
SN: SnapshotService,
S: SyncProvider,
M: MinerService<State = T>,
EM: ExternalMinerService,
Trait Implementations
sourceimpl<C, SN: ?Sized, S: ?Sized, M, EM, T: StateInfo + 'static> Eth for EthClient<C, SN, S, M, EM> where
C: BlockChainClient + StateClient<State = T> + ProvingBlockChainClient + Call<State = T> + EngineInfo + 'static,
SN: SnapshotService + 'static,
S: SyncProvider + 'static,
M: MinerService<State = T> + 'static,
EM: ExternalMinerService + 'static,
impl<C, SN: ?Sized, S: ?Sized, M, EM, T: StateInfo + 'static> Eth for EthClient<C, SN, S, M, EM> where
C: BlockChainClient + StateClient<State = T> + ProvingBlockChainClient + Call<State = T> + EngineInfo + 'static,
SN: SnapshotService + 'static,
S: SyncProvider + 'static,
M: MinerService<State = T> + 'static,
EM: ExternalMinerService + 'static,
sourcefn protocol_version(&self) -> Result<String>
fn protocol_version(&self) -> Result<String>
Returns protocol version encoded as a string (quotes are necessary).
sourcefn syncing(&self) -> Result<SyncStatus>
fn syncing(&self) -> Result<SyncStatus>
Returns an object with data about the sync status or false. (wtf?)
Returns block author.
sourcefn chain_id(&self) -> Result<Option<U64>>
fn chain_id(&self) -> Result<Option<U64>>
Returns the chain ID used for transaction signing at the current best block. None is returned if not available. Read more
sourcefn hashrate(&self) -> Result<U256>
fn hashrate(&self) -> Result<U256>
Returns the number of hashes per second that the node is mining with.
sourcefn max_priority_fee_per_gas(&self) -> BoxFuture<U256>
fn max_priority_fee_per_gas(&self) -> BoxFuture<U256>
Returns current max_priority_fee
sourcefn fee_history(
&self,
block_count: U256,
newest_block: BlockNumber,
reward_percentiles: Option<Vec<f64>>
) -> BoxFuture<EthFeeHistory>
fn fee_history(
&self,
block_count: U256,
newest_block: BlockNumber,
reward_percentiles: Option<Vec<f64>>
) -> BoxFuture<EthFeeHistory>
Returns transaction fee history.
sourcefn block_number(&self) -> Result<U256>
fn block_number(&self) -> Result<U256>
Returns highest block number.
sourcefn balance(&self, address: H160, num: Option<BlockNumber>) -> BoxFuture<U256>
fn balance(&self, address: H160, num: Option<BlockNumber>) -> BoxFuture<U256>
Returns balance of the given account.
sourcefn proof(
&self,
address: H160,
values: Vec<H256>,
num: Option<BlockNumber>
) -> BoxFuture<EthAccount>
fn proof(
&self,
address: H160,
values: Vec<H256>,
num: Option<BlockNumber>
) -> BoxFuture<EthAccount>
Returns the account- and storage-values of the specified account including the Merkle-proof
sourcefn storage_at(
&self,
address: H160,
position: U256,
num: Option<BlockNumber>
) -> BoxFuture<H256>
fn storage_at(
&self,
address: H160,
position: U256,
num: Option<BlockNumber>
) -> BoxFuture<H256>
Returns content of the storage at given address.
sourcefn transaction_count(
&self,
address: H160,
num: Option<BlockNumber>
) -> BoxFuture<U256>
fn transaction_count(
&self,
address: H160,
num: Option<BlockNumber>
) -> BoxFuture<U256>
Returns the number of transactions sent from given address at given time (block number).
sourcefn block_transaction_count_by_hash(&self, hash: H256) -> BoxFuture<Option<U256>>
fn block_transaction_count_by_hash(&self, hash: H256) -> BoxFuture<Option<U256>>
Returns the number of transactions in a block with given hash.
sourcefn block_transaction_count_by_number(
&self,
num: BlockNumber
) -> BoxFuture<Option<U256>>
fn block_transaction_count_by_number(
&self,
num: BlockNumber
) -> BoxFuture<Option<U256>>
Returns the number of transactions in a block with given block number.
sourcefn block_uncles_count_by_hash(&self, hash: H256) -> BoxFuture<Option<U256>>
fn block_uncles_count_by_hash(&self, hash: H256) -> BoxFuture<Option<U256>>
Returns the number of uncles in a block with given hash.
sourcefn block_uncles_count_by_number(
&self,
num: BlockNumber
) -> BoxFuture<Option<U256>>
fn block_uncles_count_by_number(
&self,
num: BlockNumber
) -> BoxFuture<Option<U256>>
Returns the number of uncles in a block with given block number.
sourcefn code_at(&self, address: H160, num: Option<BlockNumber>) -> BoxFuture<Bytes>
fn code_at(&self, address: H160, num: Option<BlockNumber>) -> BoxFuture<Bytes>
Returns the code at given address at given time (block number).
sourcefn block_by_hash(
&self,
hash: H256,
include_txs: bool
) -> BoxFuture<Option<Rich<Block>>>
fn block_by_hash(
&self,
hash: H256,
include_txs: bool
) -> BoxFuture<Option<Rich<Block>>>
Returns block with given hash.
sourcefn block_by_number(
&self,
num: BlockNumber,
include_txs: bool
) -> BoxFuture<Option<Rich<Block>>>
fn block_by_number(
&self,
num: BlockNumber,
include_txs: bool
) -> BoxFuture<Option<Rich<Block>>>
Returns block with given number.
sourcefn transaction_by_hash(&self, hash: H256) -> BoxFuture<Option<Transaction>>
fn transaction_by_hash(&self, hash: H256) -> BoxFuture<Option<Transaction>>
Get transaction by its hash.
sourcefn transaction_by_block_hash_and_index(
&self,
hash: H256,
index: Index
) -> BoxFuture<Option<Transaction>>
fn transaction_by_block_hash_and_index(
&self,
hash: H256,
index: Index
) -> BoxFuture<Option<Transaction>>
Returns transaction at given block hash and index.
sourcefn transaction_by_block_number_and_index(
&self,
num: BlockNumber,
index: Index
) -> BoxFuture<Option<Transaction>>
fn transaction_by_block_number_and_index(
&self,
num: BlockNumber,
index: Index
) -> BoxFuture<Option<Transaction>>
Returns transaction by given block number and index.
sourcefn transaction_receipt(&self, hash: H256) -> BoxFuture<Option<Receipt>>
fn transaction_receipt(&self, hash: H256) -> BoxFuture<Option<Receipt>>
Returns transaction receipt by transaction hash.
sourcefn uncle_by_block_hash_and_index(
&self,
hash: H256,
index: Index
) -> BoxFuture<Option<Rich<Block>>>
fn uncle_by_block_hash_and_index(
&self,
hash: H256,
index: Index
) -> BoxFuture<Option<Rich<Block>>>
Returns an uncles at given block and index.
sourcefn uncle_by_block_number_and_index(
&self,
num: BlockNumber,
index: Index
) -> BoxFuture<Option<Rich<Block>>>
fn uncle_by_block_number_and_index(
&self,
num: BlockNumber,
index: Index
) -> BoxFuture<Option<Rich<Block>>>
Returns an uncles at given block and index.
sourcefn logs(&self, filter: Filter) -> BoxFuture<Vec<Log>>
fn logs(&self, filter: Filter) -> BoxFuture<Vec<Log>>
Returns logs matching given filter object.
sourcefn work(&self, no_new_work_timeout: Option<u64>) -> Result<Work>
fn work(&self, no_new_work_timeout: Option<u64>) -> Result<Work>
Returns the hash of the current block, the seedHash, and the boundary condition to be met.
sourcefn submit_work(
&self,
nonce: H64,
pow_hash: H256,
mix_hash: H256
) -> Result<bool>
fn submit_work(
&self,
nonce: H64,
pow_hash: H256,
mix_hash: H256
) -> Result<bool>
Used for submitting a proof-of-work solution.
sourcefn submit_hashrate(&self, rate: U256, id: H256) -> Result<bool>
fn submit_hashrate(&self, rate: U256, id: H256) -> Result<bool>
Used for submitting mining hashrate.
sourcefn send_raw_transaction(&self, raw: Bytes) -> Result<H256>
fn send_raw_transaction(&self, raw: Bytes) -> Result<H256>
Sends signed transaction, returning its hash.
sourcefn submit_transaction(&self, raw: Bytes) -> Result<H256>
fn submit_transaction(&self, raw: Bytes) -> Result<H256>
@alias of eth_sendRawTransaction
.
sourcefn call(
&self,
request: CallRequest,
num: Option<BlockNumber>
) -> BoxFuture<Bytes>
fn call(
&self,
request: CallRequest,
num: Option<BlockNumber>
) -> BoxFuture<Bytes>
Call contract, returning the output data.
sourcefn estimate_gas(
&self,
request: CallRequest,
num: Option<BlockNumber>
) -> BoxFuture<U256>
fn estimate_gas(
&self,
request: CallRequest,
num: Option<BlockNumber>
) -> BoxFuture<U256>
Estimate gas needed for execution of given contract.
sourcefn compile_solidity(&self, _: String) -> Result<Bytes>
fn compile_solidity(&self, _: String) -> Result<Bytes>
Compiles solidity. @deprecated Read more
sourcefn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
Create an IoDelegate
, wiring rpc calls to the trait methods.
Auto Trait Implementations
impl<C, SN, S, M, EM> !RefUnwindSafe for EthClient<C, SN, S, M, EM>
impl<C, SN: ?Sized, S: ?Sized, M, EM> Send for EthClient<C, SN, S, M, EM>
impl<C, SN: ?Sized, S: ?Sized, M, EM> Sync for EthClient<C, SN, S, M, EM>
impl<C, SN: ?Sized, S: ?Sized, M, EM> Unpin for EthClient<C, SN, S, M, EM>
impl<C, SN, S, M, EM> !UnwindSafe for EthClient<C, SN, S, M, EM>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more