[−][src]Struct in3::eth1::api::Api
Primary interface for the Ethereum JSON RPC API.
Implementations
impl Api
[src]
pub async fn get_storage_at<'_>(
&'_ mut self,
address: Address,
key: U256,
block: BlockNumber
) -> In3Result<U256>
[src]
&'_ mut self,
address: Address,
key: U256,
block: BlockNumber
) -> In3Result<U256>
Returns the value from a storage position at a given address.
Arguments
address
- address of the storage.key
- position in the storage.block
-BlockNumber
pub async fn get_code<'_>(
&'_ mut self,
address: Address,
block: BlockNumber
) -> In3Result<Bytes>
[src]
&'_ mut self,
address: Address,
block: BlockNumber
) -> In3Result<Bytes>
pub async fn get_balance<'_>(
&'_ mut self,
address: Address,
block: BlockNumber
) -> In3Result<U256>
[src]
&'_ mut self,
address: Address,
block: BlockNumber
) -> In3Result<U256>
Returns the balance of the account of given address.
Arguments
address
- addressblock
-BlockNumber
pub async fn block_number<'_>(&'_ mut self) -> In3Result<U256>
[src]
Returns the number of most recent block.
pub async fn gas_price<'_>(&'_ mut self) -> In3Result<U256>
[src]
Returns the current price per gas in wei.
pub async fn get_block_by_number<'_>(
&'_ mut self,
block: BlockNumber,
include_tx: bool
) -> In3Result<Block>
[src]
&'_ mut self,
block: BlockNumber,
include_tx: bool
) -> In3Result<Block>
Returns information about a block by block number.
Arguments
block
-BlockNumber
include_tx
- boolean which if true returns the full transaction objects otherwise only the hashes of the transactions.
pub async fn get_block_by_hash<'_>(
&'_ mut self,
hash: Hash,
include_tx: bool
) -> In3Result<Block>
[src]
&'_ mut self,
hash: Hash,
include_tx: bool
) -> In3Result<Block>
Returns information about a block by hash.
Arguments
hash
- hash of a block.include_tx
- boolean which if true returns the full transaction objects otherwise only the hashes of the transactions.
pub async fn get_logs<'_>(
&'_ mut self,
filter_options: Value
) -> In3Result<Vec<Log>>
[src]
&'_ mut self,
filter_options: Value
) -> In3Result<Vec<Log>>
Returns an array of all logs matching a given filter object.
Arguments
filter_options
- options serialized as a JSON object -- fromBlock: (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
- toBlock: (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
- address: (optional) Contract address or a list of addresses from which logs should originate.
- topics: (optional) Array of 32 Bytes DATA topics. Each topic can also be an array of DATA with "or" options.
pub async fn new_filter<'_>(
&'_ mut self,
filter_options: Value
) -> In3Result<U256>
[src]
&'_ mut self,
filter_options: Value
) -> In3Result<U256>
Creates a filter object, based on filter options.
Arguments
filter_options
- options serialized as a JSON object -- fromBlock: (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
- toBlock: (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
- address: (optional) Contract address or a list of addresses from which logs should originate.
- topics: (optional) Array of 32 Bytes DATA topics. Each topic can also be an array of DATA with "or" options.
pub async fn new_block_filter<'_>(&'_ mut self) -> In3Result<U256>
[src]
Creates a filter in the node, to notify when a new block arrives.
pub async fn new_pending_transaction_filter<'_>(&'_ mut self) -> In3Result<U256>
[src]
Creates a filter in the node, to notify when new pending transactions arrive.
Panics
This function is not implemented and calls to it will panic.
pub async fn uninstall_filter<'_>(
&'_ mut self,
filter_id: U256
) -> In3Result<bool>
[src]
&'_ mut self,
filter_id: U256
) -> In3Result<bool>
pub async fn get_filter_changes<'_>(
&'_ mut self,
filter_id: U256
) -> In3Result<FilterChanges>
[src]
&'_ mut self,
filter_id: U256
) -> In3Result<FilterChanges>
Polling method for a filter, which returns an array of logs which occurred since last poll.
Arguments
filter_id
- id of filter that must be polled.
pub async fn get_filter_logs<'_>(
&'_ mut self,
filter_id: U256
) -> In3Result<Vec<Log>>
[src]
&'_ mut self,
filter_id: U256
) -> In3Result<Vec<Log>>
Returns an array of all logs matching filter with given id.
Arguments
filter_id
- id of filter that must be matched against.
pub async fn chain_id<'_>(&'_ mut self) -> In3Result<U256>
[src]
Returns the currently configured chain id, a value used in replay-protected transaction signing as introduced by EIP-155.
pub async fn get_block_transaction_count_by_hash<'_>(
&'_ mut self,
hash: Hash
) -> In3Result<U256>
[src]
&'_ mut self,
hash: Hash
) -> In3Result<U256>
Returns the number of transactions in a block from a block matching the given block hash.
Arguments
hash
- hash of a block.
pub async fn get_block_transaction_count_by_number<'_>(
&'_ mut self,
block: BlockNumber
) -> In3Result<U256>
[src]
&'_ mut self,
block: BlockNumber
) -> In3Result<U256>
Returns the number of transactions in a block matching the given block number.
Arguments
block
-BlockNumber
pub async fn call<'_>(
&'_ mut self,
transaction: CallTransaction,
block: BlockNumber
) -> In3Result<Bytes>
[src]
&'_ mut self,
transaction: CallTransaction,
block: BlockNumber
) -> In3Result<Bytes>
Executes a new message call immediately without creating a transaction on the block chain.
Arguments
transaction
-CallTransaction
block
-BlockNumber
pub async fn estimate_gas<'_>(
&'_ mut self,
transaction: CallTransaction,
block: BlockNumber
) -> In3Result<U256>
[src]
&'_ mut self,
transaction: CallTransaction,
block: BlockNumber
) -> In3Result<U256>
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
Arguments
transaction
-CallTransaction
block
-BlockNumber
pub async fn get_transaction_by_hash<'_>(
&'_ mut self,
hash: Hash
) -> In3Result<Transaction>
[src]
&'_ mut self,
hash: Hash
) -> In3Result<Transaction>
Returns the information about a transaction requested by transaction hash.
Arguments
hash
- hash of transaction.
pub async fn get_transaction_by_block_hash_and_index<'_>(
&'_ mut self,
hash: Hash,
index: U256
) -> In3Result<Transaction>
[src]
&'_ mut self,
hash: Hash,
index: U256
) -> In3Result<Transaction>
Returns information about a transaction by block hash and transaction index position.
Arguments
hash
- hash of a block.index
- transaction index position.
pub async fn get_transaction_by_block_number_and_index<'_>(
&'_ mut self,
block: BlockNumber,
index: U256
) -> In3Result<Transaction>
[src]
&'_ mut self,
block: BlockNumber,
index: U256
) -> In3Result<Transaction>
Returns information about a transaction by block number and transaction index position.
Arguments
block
-BlockNumber
index
- transaction index position.
pub async fn get_transaction_count<'_>(
&'_ mut self,
address: Address,
block: BlockNumber
) -> In3Result<U256>
[src]
&'_ mut self,
address: Address,
block: BlockNumber
) -> In3Result<U256>
Returns the number of transactions sent from an address.
Arguments
address
-BlockNumber
block
-BlockNumber
pub async fn get_uncle_by_block_number_and_index<'_>(
&'_ mut self,
block: BlockNumber,
index: U256
) -> In3Result<Block>
[src]
&'_ mut self,
block: BlockNumber,
index: U256
) -> In3Result<Block>
Returns information about a uncle of a block by number and uncle index position.
Arguments
block
-BlockNumber
index
- the uncle's index position.
pub async fn get_uncle_by_block_hash_and_index<'_>(
&'_ mut self,
hash: Hash,
index: U256
) -> In3Result<Block>
[src]
&'_ mut self,
hash: Hash,
index: U256
) -> In3Result<Block>
Returns information about a uncle of a block by hash and uncle index position.
Arguments
hash
- hash of a block.index
- the uncle's index position.
pub async fn get_uncle_count_by_block_hash<'_>(
&'_ mut self,
hash: Hash
) -> In3Result<U256>
[src]
&'_ mut self,
hash: Hash
) -> In3Result<U256>
Returns the number of uncles in a block from a block matching the given block hash.
Arguments
hash
- hash of a block.
pub async fn get_uncle_count_by_block_number<'_>(
&'_ mut self,
block: BlockNumber
) -> In3Result<U256>
[src]
&'_ mut self,
block: BlockNumber
) -> In3Result<U256>
Returns the number of uncles in a block from a block matching the given block number.
Arguments
block
-BlockNumber
pub async fn send_transaction<'_>(
&'_ mut self,
transaction: OutgoingTransaction
) -> In3Result<Hash>
[src]
&'_ mut self,
transaction: OutgoingTransaction
) -> In3Result<Hash>
Creates new message call transaction or a contract creation, if the data field contains code.
Arguments
transaction
-OutgoingTransaction
pub async fn send_raw_transaction<'_>(
&'_ mut self,
data: Bytes
) -> In3Result<Hash>
[src]
&'_ mut self,
data: Bytes
) -> In3Result<Hash>
Creates new message call transaction or a contract creation for signed transactions.
Arguments
data
- signed transaction data as bytes.
pub async fn get_transaction_receipt<'_>(
&'_ mut self,
transaction_hash: Hash
) -> In3Result<TransactionReceipt>
[src]
&'_ mut self,
transaction_hash: Hash
) -> In3Result<TransactionReceipt>
Returns the receipt of a transaction by transaction hash.
Arguments
transaction_hash
- hash of a transaction.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Api
impl !Send for Api
impl !Sync for Api
impl Unpin for Api
impl !UnwindSafe for Api
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,