Trait ethcore::client::BlockChainClient[][src]

pub trait BlockChainClient: Sync + Send + AccountData + BlockChain + CallContract + RegistryInfo + ImportBlock + IoClient {
    fn block_number(&self, id: BlockId) -> Option<BlockNumber>;
fn block_body(&self, id: BlockId) -> Option<Body>;
fn block_status(&self, id: BlockId) -> BlockStatus;
fn block_total_difficulty(&self, id: BlockId) -> Option<U256>;
fn storage_root(&self, address: &Address, id: BlockId) -> Option<H256>;
fn block_hash(&self, id: BlockId) -> Option<H256>;
fn code(
        &self,
        address: &Address,
        state: StateOrBlock
    ) -> Option<Option<Bytes>>;
fn storage_at(
        &self,
        address: &Address,
        position: &H256,
        state: StateOrBlock
    ) -> Option<H256>;
fn list_accounts(
        &self,
        id: BlockId,
        after: Option<&Address>,
        count: u64
    ) -> Option<Vec<Address>>;
fn list_storage(
        &self,
        id: BlockId,
        account: &Address,
        after: Option<&H256>,
        count: u64
    ) -> Option<Vec<H256>>;
fn transaction(&self, id: TransactionId) -> Option<LocalizedTransaction>;
fn uncle(&self, id: UncleId) -> Option<Header>;
fn transaction_receipt(&self, id: TransactionId) -> Option<LocalizedReceipt>;
fn tree_route(&self, from: &H256, to: &H256) -> Option<TreeRoute>;
fn find_uncles(&self, hash: &H256) -> Option<Vec<H256>>;
fn state_data(&self, hash: &H256) -> Option<Bytes>;
fn block_receipts(&self, hash: &H256) -> Option<Bytes>;
fn queue_info(&self) -> BlockQueueInfo;
fn clear_queue(&self);
fn additional_params(&self) -> BTreeMap<String, String>;
fn logs(&self, filter: Filter) -> Vec<LocalizedLogEntry>;
fn replay(
        &self,
        t: TransactionId,
        analytics: CallAnalytics
    ) -> Result<Executed, CallError>;
fn replay_block_transactions(
        &self,
        block: BlockId,
        analytics: CallAnalytics
    ) -> Result<Box<Iterator<Item = (H256, Executed)>>, CallError>;
fn filter_traces(&self, filter: TraceFilter) -> Option<Vec<LocalizedTrace>>;
fn trace(&self, trace: TraceId) -> Option<LocalizedTrace>;
fn transaction_traces(
        &self,
        trace: TransactionId
    ) -> Option<Vec<LocalizedTrace>>;
fn block_traces(&self, trace: BlockId) -> Option<Vec<LocalizedTrace>>;
fn last_hashes(&self) -> LastHashes;
fn ready_transactions(
        &self,
        max_len: usize
    ) -> Vec<Arc<VerifiedTransaction>>;
fn signing_chain_id(&self) -> Option<u64>;
fn mode(&self) -> Mode;
fn set_mode(&self, mode: Mode);
fn spec_name(&self) -> String;
fn set_spec_name(&self, spec_name: String);
fn disable(&self);
fn block_extra_info(&self, id: BlockId) -> Option<BTreeMap<String, String>>;
fn uncle_extra_info(&self, id: UncleId) -> Option<BTreeMap<String, String>>;
fn pruning_info(&self) -> PruningInfo;
fn transact_contract(
        &self,
        address: Address,
        data: Bytes
    ) -> Result<(), Error>;
fn registrar_address(&self) -> Option<Address>;
fn eip86_transition(&self) -> u64; fn latest_code(&self, address: &Address) -> Option<Bytes> { ... }
fn latest_storage_at(&self, address: &Address, position: &H256) -> H256 { ... }
fn gas_price_corpus(&self, sample_size: usize) -> Corpus<U256> { ... } }

Blockchain database client. Owns and manages a blockchain and a block queue.

Required Methods

Look up the block number for the given block ID.

Get raw block body data by block id. Block body is an RLP list of two items: uncles and transactions.

Get block status by block header hash.

Get block total difficulty.

Attempt to get address storage root at given block. May not fail on BlockId::Latest.

Get block hash.

Get address code at given block's state.

Get address code hash at given block's state. Get value of the storage at given position at the given block's state.

May not return None if given BlockId::Latest. Returns None if and only if the block's root hash has been pruned from the DB.

Get a list of all accounts in the block id, if fat DB is in operation, otherwise None. If after is set the list starts with the following item.

Get a list of all storage keys in the block id, if fat DB is in operation, otherwise None. If after is set the list starts with the following item.

Get transaction with given hash.

Get uncle with given id.

Get transaction receipt with given hash.

Get a tree route between from and to. See BlockChain::tree_route.

Get all possible uncle hashes for a block.

Get latest state node

Get raw block receipts data by block header hash.

Get block queue information.

Clear block queue and abort all import activity.

Get the registrar address, if it exists.

Important traits for Vec<u8>

Returns logs matching given filter.

Replays a given transaction for inspection.

Replays all the transactions in a given block for inspection.

Returns traces matching given filter.

Returns trace with given id.

Returns traces created by transaction.

Returns traces created by transaction from block.

Get last hashes starting from best block.

Important traits for Vec<u8>

List all transactions that are allowed into the next block.

Get the preferred chain ID to sign on

Get the mode.

Set the mode.

Get the chain spec name.

Set the chain via a spec name.

Disable the client from importing blocks. This cannot be undone in this session and indicates that a subsystem has reason to believe this executable incapable of syncing the chain.

Returns engine-related extra info for BlockId.

Returns engine-related extra info for UncleId.

Returns information about pruning/data availability.

Schedule state-altering transaction to be executed on the next pending block.

Get the address of the registry itself.

Get the EIP-86 transition block number.

Provided Methods

Get address code at the latest block's state.

Get value of the storage at given position at the latest block's state.

Sorted list of transaction gas prices from at least last sample_size blocks.

Implementors