# Trait ethcore_rpc::v1::traits::eth::Eth [−]

    pub trait Eth: Sized + Send + Sync + 'static {
        type Metadata: Metadata;
        fn protocol_version(&self) -> Result<String, Error>;
        fn syncing(&self) -> Result<SyncStatus, Error>;
        fn hashrate(&self) -> Result<U256, Error>;
        fn author(&self, Self::Metadata) -> BoxFuture<H160, Error>;
        fn is_mining(&self) -> Result<bool, Error>;
        fn gas_price(&self) -> Result<U256, Error>;
        fn accounts(&self, Self::Metadata) -> BoxFuture<Vec<H160>, Error>;
        fn block_number(&self) -> Result<U256, Error>;
        fn balance(&self, H160, Trailing<BlockNumber>) -> Result<U256, Error>;
        fn storage_at(&self, H160, U256, Trailing<BlockNumber>) -> Result<H256, Error>;
        fn block_by_hash(&self, H256, bool) -> Result<Option<RichBlock>, Error>;
        fn block_by_number(&self, BlockNumber, bool) -> Result<Option<RichBlock>, Error>;
        fn transaction_count(&self, H160, Trailing<BlockNumber>) -> Result<U256, Error>;
        fn block_transaction_count_by_hash(&self, H256) -> Result<Option<U256>, Error>;
        fn block_transaction_count_by_number(&self,
                                         BlockNumber)
                                         -> Result<Option<U256>, Error>;
        fn block_uncles_count_by_hash(&self, H256) -> Result<Option<U256>, Error>;
        fn block_uncles_count_by_number(&self,
                                    BlockNumber)
                                    -> Result<Option<U256>, Error>;
        fn code_at(&self, H160, Trailing<BlockNumber>) -> Result<Bytes, Error>;
        fn send_raw_transaction(&self, Bytes) -> Result<H256, Error>;
        fn submit_transaction(&self, Bytes) -> Result<H256, Error>;
        fn call(&self, CallRequest, Trailing<BlockNumber>) -> Result<Bytes, Error>;
        fn estimate_gas(&self,
                    CallRequest,
                    Trailing<BlockNumber>)
                    -> Result<U256, Error>;
        fn transaction_by_hash(&self, H256) -> Result<Option<Transaction>, Error>;
        fn transaction_by_block_hash_and_index(&self,
                                           H256,
                                           Index)
                                           -> Result<Option<Transaction>, Error>;
        fn transaction_by_block_number_and_index(&self,
                                             BlockNumber,
                                             Index)
                                             -> Result<Option<Transaction>, Error>;
        fn transaction_receipt(&self, H256) -> Result<Option<Receipt>, Error>;
        fn uncle_by_block_hash_and_index(&self,
                                     H256,
                                     Index)
                                     -> Result<Option<RichBlock>, Error>;
        fn uncle_by_block_number_and_index(&self,
                                       BlockNumber,
                                       Index)
                                       -> Result<Option<RichBlock>, Error>;
        fn compilers(&self) -> Result<Vec<String>, Error>;
        fn compile_lll(&self, String) -> Result<Bytes, Error>;
        fn compile_solidity(&self, String) -> Result<Bytes, Error>;
        fn compile_serpent(&self, String) -> Result<Bytes, Error>;
        fn logs(&self, Filter) -> Result<Vec<Log>, Error>;
        fn work(&self, Trailing<u64>) -> Result<Work, Error>;
        fn submit_work(&self, H64, H256, H256) -> Result<bool, Error>;
        fn submit_hashrate(&self, U256, H256) -> Result<bool, Error>;

        fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> { ... }
    }

Eth rpc interface.

## Associated Types

### `type Metadata: Metadata`

Requests metadata

## Required Methods

### `fn protocol_version(&self) -> Result<String, Error>`

Returns protocol version encoded as a string (quotes are necessary).

### `fn syncing(&self) -> Result<SyncStatus, Error>`

Returns an object with data about the sync status or false. (wtf?)

### `fn hashrate(&self) -> Result<U256, Error>`

Returns the number of hashes per second that the node is mining with.

### `fn author(&self, Self::Metadata) -> BoxFuture<H160, Error>`

Returns block author.

### `fn is_mining(&self) -> Result<bool, Error>`

Returns true if client is actively mining new blocks.

### `fn gas_price(&self) -> Result<U256, Error>`

Returns current gas_price.

### `fn accounts(&self, Self::Metadata) -> BoxFuture<Vec<H160>, Error>`

Returns accounts list.

### `fn block_number(&self) -> Result<U256, Error>`

Returns highest block number.

### `fn balance(&self, H160, Trailing<BlockNumber>) -> Result<U256, Error>`

Returns balance of the given account.

### `fn storage_at(&self, H160, U256, Trailing<BlockNumber>) -> Result<H256, Error>`

Returns content of the storage at given address.

### `fn block_by_hash(&self, H256, bool) -> Result<Option<RichBlock>, Error>`

Returns block with given hash.

### `fn block_by_number(&self, BlockNumber, bool) -> Result<Option<RichBlock>, Error>`

Returns block with given number.

### `fn transaction_count(&self, H160, Trailing<BlockNumber>) -> Result<U256, Error>`

Returns the number of transactions sent from given address at given time (block number).

### `fn block_transaction_count_by_hash(&self, H256) -> Result<Option<U256>, Error>`

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

### `fn block_transaction_count_by_number(&self,
BlockNumber)
-> Result<Option<U256>, Error>`

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

### `fn block_uncles_count_by_hash(&self, H256) -> Result<Option<U256>, Error>`

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

### `fn block_uncles_count_by_number(&self,
BlockNumber)
-> Result<Option<U256>, Error>`

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

### `fn code_at(&self, H160, Trailing<BlockNumber>) -> Result<Bytes, Error>`

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

### `fn send_raw_transaction(&self, Bytes) -> Result<H256, Error>`

Sends signed transaction, returning its hash.

### `fn submit_transaction(&self, Bytes) -> Result<H256, Error>`

Alias of `eth_sendRawTransaction`.

### `fn call(&self, CallRequest, Trailing<BlockNumber>) -> Result<Bytes, Error>`

Call contract, returning the output data.

### `fn estimate_gas(&self,
CallRequest,
Trailing<BlockNumber>)
-> Result<U256, Error>`

Estimate gas needed for execution of given contract.

### `fn transaction_by_hash(&self, H256) -> Result<Option<Transaction>, Error>`

Get transaction by its hash.

### `fn transaction_by_block_hash_and_index(&self,
H256,
Index)
-> Result<Option<Transaction>, Error>`

Returns transaction at given block hash and index.

### `fn transaction_by_block_number_and_index(&self,
BlockNumber,
Index)
-> Result<Option<Transaction>, Error>`

Returns transaction by given block number and index.

### `fn transaction_receipt(&self, H256) -> Result<Option<Receipt>, Error>`

Returns transaction receipt.

### `fn uncle_by_block_hash_and_index(&self,
H256,
Index)
-> Result<Option<RichBlock>, Error>`

Returns an uncles at given block and index.

### `fn uncle_by_block_number_and_index(&self,
BlockNumber,
Index)
-> Result<Option<RichBlock>, Error>`

Returns an uncles at given block and index.

### `fn compilers(&self) -> Result<Vec<String>, Error>`

Returns available compilers.

### `fn compile_lll(&self, String) -> Result<Bytes, Error>`

Compiles lll code.

### `fn compile_solidity(&self, String) -> Result<Bytes, Error>`

Compiles solidity.

### `fn compile_serpent(&self, String) -> Result<Bytes, Error>`

Compiles serpent.

### `fn logs(&self, Filter) -> Result<Vec<Log>, Error>`

Returns logs matching given filter object.

### `fn work(&self, Trailing<u64>) -> Result<Work, Error>`

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

### `fn submit_work(&self, H64, H256, H256) -> Result<bool, Error>`

Used for submitting a proof-of-work solution.

### `fn submit_hashrate(&self, U256, H256) -> Result<bool, Error>`

Used for submitting mining hashrate.

## Provided Methods

### `fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>`

Transform this into an `IoDelegate`, automatically wrapping the parameters.

## Implementors

- `impl<C, SN: ?Sized, S: ?Sized, M, EM> Eth for EthClient<C, SN, S, M, EM> where C: MiningBlockChainClient + 'static, SN: SnapshotService + 'static, S: SyncProvider + 'static, M: MinerService + 'static, EM: ExternalMinerService + 'static`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)