Trait parity_rpc::v1::Eth
source · [−]pub trait Eth: Sized + Send + Sync + 'static {
Show 41 methods
fn protocol_version(&self) -> Result<String>;
fn syncing(&self) -> Result<SyncStatus>;
fn hashrate(&self) -> Result<U256>;
fn author(&self) -> Result<H160>;
fn is_mining(&self) -> Result<bool>;
fn chain_id(&self) -> Result<Option<U64>>;
fn gas_price(&self) -> BoxFuture<U256>;
fn max_priority_fee_per_gas(&self) -> BoxFuture<U256>;
fn fee_history(
&self,
_: U256,
_: BlockNumber,
_: Option<Vec<f64>>
) -> BoxFuture<EthFeeHistory>;
fn accounts(&self) -> Result<Vec<H160>>;
fn block_number(&self) -> Result<U256>;
fn balance(&self, _: H160, _: Option<BlockNumber>) -> BoxFuture<U256>;
fn proof(
&self,
_: H160,
_: Vec<H256>,
_: Option<BlockNumber>
) -> BoxFuture<EthAccount>;
fn storage_at(
&self,
_: H160,
_: U256,
_: Option<BlockNumber>
) -> BoxFuture<H256>;
fn block_by_hash(&self, _: H256, _: bool) -> BoxFuture<Option<Rich<Block>>>;
fn block_by_number(
&self,
_: BlockNumber,
_: bool
) -> BoxFuture<Option<Rich<Block>>>;
fn transaction_count(
&self,
_: H160,
_: Option<BlockNumber>
) -> BoxFuture<U256>;
fn block_transaction_count_by_hash(
&self,
_: H256
) -> BoxFuture<Option<U256>>;
fn block_transaction_count_by_number(
&self,
_: BlockNumber
) -> BoxFuture<Option<U256>>;
fn block_uncles_count_by_hash(&self, _: H256) -> BoxFuture<Option<U256>>;
fn block_uncles_count_by_number(
&self,
_: BlockNumber
) -> BoxFuture<Option<U256>>;
fn code_at(&self, _: H160, _: Option<BlockNumber>) -> BoxFuture<Bytes>;
fn send_raw_transaction(&self, _: Bytes) -> Result<H256>;
fn submit_transaction(&self, _: Bytes) -> Result<H256>;
fn call(&self, _: CallRequest, _: Option<BlockNumber>) -> BoxFuture<Bytes>;
fn estimate_gas(
&self,
_: CallRequest,
_: Option<BlockNumber>
) -> BoxFuture<U256>;
fn transaction_by_hash(&self, _: H256) -> BoxFuture<Option<Transaction>>;
fn transaction_by_block_hash_and_index(
&self,
_: H256,
_: Index
) -> BoxFuture<Option<Transaction>>;
fn transaction_by_block_number_and_index(
&self,
_: BlockNumber,
_: Index
) -> BoxFuture<Option<Transaction>>;
fn transaction_receipt(&self, _: H256) -> BoxFuture<Option<Receipt>>;
fn uncle_by_block_hash_and_index(
&self,
_: H256,
_: Index
) -> BoxFuture<Option<Rich<Block>>>;
fn uncle_by_block_number_and_index(
&self,
_: BlockNumber,
_: Index
) -> BoxFuture<Option<Rich<Block>>>;
fn compilers(&self) -> Result<Vec<String>>;
fn compile_lll(&self, _: String) -> Result<Bytes>;
fn compile_solidity(&self, _: String) -> Result<Bytes>;
fn compile_serpent(&self, _: String) -> Result<Bytes>;
fn logs(&self, _: Filter) -> BoxFuture<Vec<Log>>;
fn work(&self, _: Option<u64>) -> Result<Work>;
fn submit_work(&self, _: H64, _: H256, _: H256) -> Result<bool>;
fn submit_hashrate(&self, _: U256, _: H256) -> Result<bool>;
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M> { ... }
}
Expand description
Eth rpc interface.
Required methods
fn protocol_version(&self) -> Result<String>
fn protocol_version(&self) -> Result<String>
Returns protocol version encoded as a string (quotes are necessary).
Returns an object with data about the sync status or false. (wtf?)
Returns the number of hashes per second that the node is mining with.
Returns block author.
Returns the chain ID used for transaction signing at the current best block. None is returned if not available.
fn max_priority_fee_per_gas(&self) -> BoxFuture<U256>
fn max_priority_fee_per_gas(&self) -> BoxFuture<U256>
Returns current max_priority_fee
Returns transaction fee history.
fn block_number(&self) -> Result<U256>
fn block_number(&self) -> Result<U256>
Returns highest block number.
Returns balance of the given account.
Returns the account- and storage-values of the specified account including the Merkle-proof
Returns content of the storage at given address.
Returns block with given hash.
fn block_by_number(
&self,
_: BlockNumber,
_: bool
) -> BoxFuture<Option<Rich<Block>>>
fn block_by_number(
&self,
_: BlockNumber,
_: bool
) -> BoxFuture<Option<Rich<Block>>>
Returns block with given number.
Returns the number of transactions sent from given address at given time (block number).
Returns the number of transactions in a block with given hash.
fn block_transaction_count_by_number(
&self,
_: BlockNumber
) -> BoxFuture<Option<U256>>
fn block_transaction_count_by_number(
&self,
_: BlockNumber
) -> BoxFuture<Option<U256>>
Returns the number of transactions in a block with given block number.
Returns the number of uncles in a block with given hash.
fn block_uncles_count_by_number(
&self,
_: BlockNumber
) -> BoxFuture<Option<U256>>
fn block_uncles_count_by_number(
&self,
_: BlockNumber
) -> BoxFuture<Option<U256>>
Returns the number of uncles in a block with given block number.
Returns the code at given address at given time (block number).
fn send_raw_transaction(&self, _: Bytes) -> Result<H256>
fn send_raw_transaction(&self, _: Bytes) -> Result<H256>
Sends signed transaction, returning its hash.
fn submit_transaction(&self, _: Bytes) -> Result<H256>
fn submit_transaction(&self, _: Bytes) -> Result<H256>
@alias of eth_sendRawTransaction
.
Call contract, returning the output data.
fn estimate_gas(
&self,
_: CallRequest,
_: Option<BlockNumber>
) -> BoxFuture<U256>
fn estimate_gas(
&self,
_: CallRequest,
_: Option<BlockNumber>
) -> BoxFuture<U256>
Estimate gas needed for execution of given contract.
fn transaction_by_hash(&self, _: H256) -> BoxFuture<Option<Transaction>>
fn transaction_by_hash(&self, _: H256) -> BoxFuture<Option<Transaction>>
Get transaction by its hash.
fn transaction_by_block_hash_and_index(
&self,
_: H256,
_: Index
) -> BoxFuture<Option<Transaction>>
fn transaction_by_block_hash_and_index(
&self,
_: H256,
_: Index
) -> BoxFuture<Option<Transaction>>
Returns transaction at given block hash and index.
fn transaction_by_block_number_and_index(
&self,
_: BlockNumber,
_: Index
) -> BoxFuture<Option<Transaction>>
fn transaction_by_block_number_and_index(
&self,
_: BlockNumber,
_: Index
) -> BoxFuture<Option<Transaction>>
Returns transaction by given block number and index.
fn transaction_receipt(&self, _: H256) -> BoxFuture<Option<Receipt>>
fn transaction_receipt(&self, _: H256) -> BoxFuture<Option<Receipt>>
Returns transaction receipt by transaction hash.
fn uncle_by_block_hash_and_index(
&self,
_: H256,
_: Index
) -> BoxFuture<Option<Rich<Block>>>
fn uncle_by_block_hash_and_index(
&self,
_: H256,
_: Index
) -> BoxFuture<Option<Rich<Block>>>
Returns an uncles at given block and index.
fn uncle_by_block_number_and_index(
&self,
_: BlockNumber,
_: Index
) -> BoxFuture<Option<Rich<Block>>>
fn uncle_by_block_number_and_index(
&self,
_: BlockNumber,
_: Index
) -> BoxFuture<Option<Rich<Block>>>
Returns an uncles at given block and index.
fn compile_lll(&self, _: String) -> Result<Bytes>
fn compile_lll(&self, _: String) -> Result<Bytes>
Compiles lll code. @deprecated
fn compile_solidity(&self, _: String) -> Result<Bytes>
fn compile_solidity(&self, _: String) -> Result<Bytes>
Compiles solidity. @deprecated
fn compile_serpent(&self, _: String) -> Result<Bytes>
fn compile_serpent(&self, _: String) -> Result<Bytes>
Compiles serpent. @deprecated
Returns the hash of the current block, the seedHash, and the boundary condition to be met.
Used for submitting a proof-of-work solution.
Provided methods
fn 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.