Trait evm_rpc::ChainMockERPC[][src]

pub trait ChainMockERPC: Sized + Send + Sync + 'static {
    type Metadata: Metadata;
    fn client_version(&self, meta: Self::Metadata) -> Result<String, Error>;
fn sha3(
        &self,
        meta: Self::Metadata,
        bytes: Bytes
    ) -> Result<Hex<H256>, Error>;
fn network_id(&self, meta: Self::Metadata) -> Result<String, Error>;
fn is_listening(&self, meta: Self::Metadata) -> Result<bool, Error>;
fn peer_count(&self, meta: Self::Metadata) -> Result<Hex<usize>, Error>;
fn chain_id(&self, meta: Self::Metadata) -> Result<Hex<u64>, Error>;
fn protocol_version(&self, meta: Self::Metadata) -> Result<String, Error>;
fn is_syncing(&self, meta: Self::Metadata) -> Result<bool, Error>;
fn coinbase(&self, meta: Self::Metadata) -> Result<Hex<Address>, Error>;
fn is_mining(&self, meta: Self::Metadata) -> Result<bool, Error>;
fn hashrate(&self, meta: Self::Metadata) -> Result<String, Error>;
fn block_by_hash(
        &self,
        meta: Self::Metadata,
        block_hash: Hex<H256>,
        full: bool
    ) -> Result<Option<RPCBlock>, Error>;
fn block_by_number(
        &self,
        meta: Self::Metadata,
        block: String,
        full: bool
    ) -> Result<Option<RPCBlock>, Error>;
fn uncle_by_block_hash_and_index(
        &self,
        meta: Self::Metadata,
        block_hash: Hex<H256>,
        uncle_id: Hex<U256>
    ) -> Result<Option<RPCBlock>, Error>;
fn uncle_by_block_number_and_index(
        &self,
        meta: Self::Metadata,
        block: String,
        uncle_id: Hex<U256>
    ) -> Result<Option<RPCBlock>, Error>;
fn block_transaction_count_by_hash(
        &self,
        meta: Self::Metadata,
        block_hash: Hex<H256>
    ) -> Result<Option<Hex<usize>>, Error>;
fn block_transaction_count_by_number(
        &self,
        meta: Self::Metadata,
        block: String
    ) -> Result<Option<Hex<usize>>, Error>;
fn block_uncles_count_by_hash(
        &self,
        meta: Self::Metadata,
        block_hash: Hex<H256>
    ) -> Result<Option<Hex<usize>>, Error>;
fn block_uncles_count_by_number(
        &self,
        meta: Self::Metadata,
        block: String
    ) -> Result<Option<Hex<usize>>, Error>;
fn transaction_by_block_hash_and_index(
        &self,
        meta: Self::Metadata,
        block_hash: Hex<H256>,
        tx_id: Hex<U256>
    ) -> Result<Option<RPCTransaction>, Error>;
fn transaction_by_block_number_and_index(
        &self,
        meta: Self::Metadata,
        block: String,
        tx_id: Hex<U256>
    ) -> Result<Option<RPCTransaction>, Error>; fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> { ... } }

Associated Types

type Metadata: Metadata[src]

Loading content...

Required methods

fn client_version(&self, meta: Self::Metadata) -> Result<String, Error>[src]

fn sha3(&self, meta: Self::Metadata, bytes: Bytes) -> Result<Hex<H256>, Error>[src]

fn network_id(&self, meta: Self::Metadata) -> Result<String, Error>[src]

fn is_listening(&self, meta: Self::Metadata) -> Result<bool, Error>[src]

fn peer_count(&self, meta: Self::Metadata) -> Result<Hex<usize>, Error>[src]

fn chain_id(&self, meta: Self::Metadata) -> Result<Hex<u64>, Error>[src]

fn protocol_version(&self, meta: Self::Metadata) -> Result<String, Error>[src]

fn is_syncing(&self, meta: Self::Metadata) -> Result<bool, Error>[src]

fn coinbase(&self, meta: Self::Metadata) -> Result<Hex<Address>, Error>[src]

fn is_mining(&self, meta: Self::Metadata) -> Result<bool, Error>[src]

fn hashrate(&self, meta: Self::Metadata) -> Result<String, Error>[src]

fn block_by_hash(
    &self,
    meta: Self::Metadata,
    block_hash: Hex<H256>,
    full: bool
) -> Result<Option<RPCBlock>, Error>
[src]

fn block_by_number(
    &self,
    meta: Self::Metadata,
    block: String,
    full: bool
) -> Result<Option<RPCBlock>, Error>
[src]

fn uncle_by_block_hash_and_index(
    &self,
    meta: Self::Metadata,
    block_hash: Hex<H256>,
    uncle_id: Hex<U256>
) -> Result<Option<RPCBlock>, Error>
[src]

fn uncle_by_block_number_and_index(
    &self,
    meta: Self::Metadata,
    block: String,
    uncle_id: Hex<U256>
) -> Result<Option<RPCBlock>, Error>
[src]

fn block_transaction_count_by_hash(
    &self,
    meta: Self::Metadata,
    block_hash: Hex<H256>
) -> Result<Option<Hex<usize>>, Error>
[src]

fn block_transaction_count_by_number(
    &self,
    meta: Self::Metadata,
    block: String
) -> Result<Option<Hex<usize>>, Error>
[src]

fn block_uncles_count_by_hash(
    &self,
    meta: Self::Metadata,
    block_hash: Hex<H256>
) -> Result<Option<Hex<usize>>, Error>
[src]

fn block_uncles_count_by_number(
    &self,
    meta: Self::Metadata,
    block: String
) -> Result<Option<Hex<usize>>, Error>
[src]

fn transaction_by_block_hash_and_index(
    &self,
    meta: Self::Metadata,
    block_hash: Hex<H256>,
    tx_id: Hex<U256>
) -> Result<Option<RPCTransaction>, Error>
[src]

fn transaction_by_block_number_and_index(
    &self,
    meta: Self::Metadata,
    block: String,
    tx_id: Hex<U256>
) -> Result<Option<RPCTransaction>, Error>
[src]

Loading content...

Provided methods

fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>[src]

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

Loading content...

Implementors

Loading content...