Trait fc_rpc::EthApiServer [−][src]
Eth rpc interface.
Required methods
pub fn protocol_version(&self) -> Result<u64, Error>
[src]
Returns protocol version encoded as a string (quotes are necessary).
pub fn syncing(&self) -> Result<SyncStatus, Error>
[src]
Returns an object with data about the sync status or false. (wtf?)
pub fn hashrate(&self) -> Result<U256, Error>
[src]
Returns the number of hashes per second that the node is mining with.
pub fn author(&self) -> Result<H160, Error>
[src]
Returns block author.
pub fn is_mining(&self) -> Result<bool, Error>
[src]
Returns true if client is actively mining new blocks.
pub fn chain_id(&self) -> Result<Option<U64>, Error>
[src]
Returns the chain ID used for transaction signing at the current best block. None is returned if not available.
pub fn gas_price(&self) -> Result<U256, Error>
[src]
Returns current gas_price.
pub fn accounts(&self) -> Result<Vec<H160, Global>, Error>
[src]
Returns accounts list.
pub fn block_number(&self) -> Result<U256, Error>
[src]
Returns highest block number.
pub fn balance(&self, H160, Option<BlockNumber>) -> Result<U256, Error>
[src]
Returns balance of the given account.
pub fn storage_at(&self, H160, U256, Option<BlockNumber>) -> Result<H256, Error>
[src]
Returns content of the storage at given address.
pub fn block_by_hash(&self, H256, bool) -> Result<Option<Rich<Block>>, Error>
[src]
Returns block with given hash.
pub fn block_by_number(
&self,
BlockNumber,
bool
) -> Result<Option<Rich<Block>>, Error>
[src]
&self,
BlockNumber,
bool
) -> Result<Option<Rich<Block>>, Error>
Returns block with given number.
pub fn transaction_count(
&self,
H160,
Option<BlockNumber>
) -> Result<U256, Error>
[src]
&self,
H160,
Option<BlockNumber>
) -> Result<U256, Error>
Returns the number of transactions sent from given address at given time (block number).
pub fn block_transaction_count_by_hash(
&self,
H256
) -> Result<Option<U256>, Error>
[src]
&self,
H256
) -> Result<Option<U256>, Error>
Returns the number of transactions in a block with given hash.
pub fn block_transaction_count_by_number(
&self,
BlockNumber
) -> Result<Option<U256>, Error>
[src]
&self,
BlockNumber
) -> Result<Option<U256>, Error>
Returns the number of transactions in a block with given block number.
pub fn block_uncles_count_by_hash(&self, H256) -> Result<U256, Error>
[src]
Returns the number of uncles in a block with given hash.
pub fn block_uncles_count_by_number(&self, BlockNumber) -> Result<U256, Error>
[src]
Returns the number of uncles in a block with given block number.
pub fn code_at(&self, H160, Option<BlockNumber>) -> Result<Bytes, Error>
[src]
Returns the code at given address at given time (block number).
pub fn send_transaction(
&self,
TransactionRequest
) -> Box<dyn Future<Item = H256, Error = Error> + 'static + Send, Global>
[src]
&self,
TransactionRequest
) -> Box<dyn Future<Item = H256, Error = Error> + 'static + Send, Global>
Sends transaction; will block waiting for signer to return the transaction hash.
pub fn send_raw_transaction(
&self,
Bytes
) -> Box<dyn Future<Item = H256, Error = Error> + 'static + Send, Global>
[src]
&self,
Bytes
) -> Box<dyn Future<Item = H256, Error = Error> + 'static + Send, Global>
Sends signed transaction, returning its hash.
pub fn call(&self, CallRequest, Option<BlockNumber>) -> Result<Bytes, Error>
[src]
Call contract, returning the output data.
pub fn estimate_gas(
&self,
CallRequest,
Option<BlockNumber>
) -> Result<U256, Error>
[src]
&self,
CallRequest,
Option<BlockNumber>
) -> Result<U256, Error>
Estimate gas needed for execution of given contract.
pub fn transaction_by_hash(&self, H256) -> Result<Option<Transaction>, Error>
[src]
Get transaction by its hash.
pub fn transaction_by_block_hash_and_index(
&self,
H256,
Index
) -> Result<Option<Transaction>, Error>
[src]
&self,
H256,
Index
) -> Result<Option<Transaction>, Error>
Returns transaction at given block hash and index.
pub fn transaction_by_block_number_and_index(
&self,
BlockNumber,
Index
) -> Result<Option<Transaction>, Error>
[src]
&self,
BlockNumber,
Index
) -> Result<Option<Transaction>, Error>
Returns transaction by given block number and index.
pub fn transaction_receipt(&self, H256) -> Result<Option<Receipt>, Error>
[src]
Returns transaction receipt by transaction hash.
pub fn uncle_by_block_hash_and_index(
&self,
H256,
Index
) -> Result<Option<Rich<Block>>, Error>
[src]
&self,
H256,
Index
) -> Result<Option<Rich<Block>>, Error>
Returns an uncles at given block and index.
pub fn uncle_by_block_number_and_index(
&self,
BlockNumber,
Index
) -> Result<Option<Rich<Block>>, Error>
[src]
&self,
BlockNumber,
Index
) -> Result<Option<Rich<Block>>, Error>
Returns an uncles at given block and index.
pub fn logs(&self, Filter) -> Result<Vec<Log, Global>, Error>
[src]
Returns logs matching given filter object.
pub fn work(&self) -> Result<Work, Error>
[src]
Returns the hash of the current block, the seedHash, and the boundary condition to be met.
pub fn submit_work(&self, H64, H256, H256) -> Result<bool, Error>
[src]
Used for submitting a proof-of-work solution.
pub fn submit_hashrate(&self, U256, H256) -> Result<bool, Error>
[src]
Used for submitting mining hashrate.
Provided methods
pub fn to_delegate<M>(self) -> IoDelegate<Self, M> where
M: Metadata,
[src]
M: Metadata,
Create an IoDelegate
, wiring rpc calls to the trait methods.
Implementors
impl<B, C, P, CT, BE, H: ExHashT> EthApi for EthApi<B, C, P, CT, BE, H> where
C: ProvideRuntimeApi<B> + StorageProvider<B, BE> + AuxStore,
C: HeaderBackend<B> + HeaderMetadata<B, Error = BlockChainError> + 'static,
C::Api: EthereumRuntimeRPCApi<B>,
BE: Backend<B> + 'static,
BE::State: StateBackend<BlakeTwo256>,
B: BlockT<Hash = H256> + Send + Sync + 'static,
C: Send + Sync + 'static,
P: TransactionPool<Block = B> + Send + Sync + 'static,
CT: ConvertTransaction<<B as BlockT>::Extrinsic> + Send + Sync + 'static,
[src]
C: ProvideRuntimeApi<B> + StorageProvider<B, BE> + AuxStore,
C: HeaderBackend<B> + HeaderMetadata<B, Error = BlockChainError> + 'static,
C::Api: EthereumRuntimeRPCApi<B>,
BE: Backend<B> + 'static,
BE::State: StateBackend<BlakeTwo256>,
B: BlockT<Hash = H256> + Send + Sync + 'static,
C: Send + Sync + 'static,
P: TransactionPool<Block = B> + Send + Sync + 'static,
CT: ConvertTransaction<<B as BlockT>::Extrinsic> + Send + Sync + 'static,
fn protocol_version(&self) -> Result<u64>
[src]
fn syncing(&self) -> Result<SyncStatus>
[src]
fn hashrate(&self) -> Result<U256>
[src]
fn author(&self) -> Result<H160>
[src]
fn is_mining(&self) -> Result<bool>
[src]
fn chain_id(&self) -> Result<Option<U64>>
[src]
fn gas_price(&self) -> Result<U256>
[src]
fn accounts(&self) -> Result<Vec<H160>>
[src]
fn block_number(&self) -> Result<U256>
[src]
fn balance(&self, address: H160, number: Option<BlockNumber>) -> Result<U256>
[src]
fn storage_at(
&self,
address: H160,
index: U256,
number: Option<BlockNumber>
) -> Result<H256>
[src]
&self,
address: H160,
index: U256,
number: Option<BlockNumber>
) -> Result<H256>
fn block_by_hash(&self, hash: H256, full: bool) -> Result<Option<RichBlock>>
[src]
fn block_by_number(
&self,
number: BlockNumber,
full: bool
) -> Result<Option<RichBlock>>
[src]
&self,
number: BlockNumber,
full: bool
) -> Result<Option<RichBlock>>
fn transaction_count(
&self,
address: H160,
number: Option<BlockNumber>
) -> Result<U256>
[src]
&self,
address: H160,
number: Option<BlockNumber>
) -> Result<U256>
fn block_transaction_count_by_hash(&self, hash: H256) -> Result<Option<U256>>
[src]
fn block_transaction_count_by_number(
&self,
number: BlockNumber
) -> Result<Option<U256>>
[src]
&self,
number: BlockNumber
) -> Result<Option<U256>>
fn block_uncles_count_by_hash(&self, _: H256) -> Result<U256>
[src]
fn block_uncles_count_by_number(&self, _: BlockNumber) -> Result<U256>
[src]
fn code_at(&self, address: H160, number: Option<BlockNumber>) -> Result<Bytes>
[src]
fn send_transaction(&self, request: TransactionRequest) -> BoxFuture<H256>
[src]
fn send_raw_transaction(&self, bytes: Bytes) -> BoxFuture<H256>
[src]
fn call(&self, request: CallRequest, _: Option<BlockNumber>) -> Result<Bytes>
[src]
fn estimate_gas(
&self,
request: CallRequest,
_: Option<BlockNumber>
) -> Result<U256>
[src]
&self,
request: CallRequest,
_: Option<BlockNumber>
) -> Result<U256>
fn transaction_by_hash(&self, hash: H256) -> Result<Option<Transaction>>
[src]
fn transaction_by_block_hash_and_index(
&self,
hash: H256,
index: Index
) -> Result<Option<Transaction>>
[src]
&self,
hash: H256,
index: Index
) -> Result<Option<Transaction>>
fn transaction_by_block_number_and_index(
&self,
number: BlockNumber,
index: Index
) -> Result<Option<Transaction>>
[src]
&self,
number: BlockNumber,
index: Index
) -> Result<Option<Transaction>>
fn transaction_receipt(&self, hash: H256) -> Result<Option<Receipt>>
[src]
fn uncle_by_block_hash_and_index(
&self,
_: H256,
_: Index
) -> Result<Option<RichBlock>>
[src]
&self,
_: H256,
_: Index
) -> Result<Option<RichBlock>>
fn uncle_by_block_number_and_index(
&self,
_: BlockNumber,
_: Index
) -> Result<Option<RichBlock>>
[src]
&self,
_: BlockNumber,
_: Index
) -> Result<Option<RichBlock>>