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

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 true if client is actively mining new blocks.

Returns the chain ID used for transaction signing at the current best block. None is returned if not available.

Returns current gas_price.

Returns current max_priority_fee

Returns transaction fee history.

Returns accounts list.

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.

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.

Returns the number of transactions in a block with given block number.

Returns the number of uncles in a block with given hash.

Returns the number of uncles in a block with given block number.

Returns the code at given address at given time (block number).

Sends signed transaction, returning its hash.

@alias of eth_sendRawTransaction.

Call contract, returning the output data.

Estimate gas needed for execution of given contract.

Get transaction by its hash.

Returns transaction at given block hash and index.

Returns transaction by given block number and index.

Returns transaction receipt by transaction hash.

Returns an uncles at given block and index.

Returns an uncles at given block and index.

Returns available compilers. @deprecated

Compiles lll code. @deprecated

Compiles solidity. @deprecated

Compiles serpent. @deprecated

Returns logs matching given filter object.

Returns the hash of the current block, the seedHash, and the boundary condition to be met.

Used for submitting a proof-of-work solution.

Used for submitting mining hashrate.

Provided methods

Create an IoDelegate, wiring rpc calls to the trait methods.

Implementors