pub struct Web3 {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl Web3
impl Web3
pub fn new(url: String) -> Self
pub async fn web3_client_version(&self) -> Result<JsonRpcResult<String>>
pub async fn web3_sha3(&self, sha3: &str) -> Result<JsonRpcResult<String>>
pub async fn net_version(&self) -> Result<JsonRpcResult<String>>
pub async fn net_listening(&self) -> Result<JsonRpcResult<bool>>
pub async fn net_peer_count(&self) -> Result<JsonRpcResult<i64>>
pub async fn eth_protocol_version(&self) -> Result<JsonRpcResult<String>>
pub async fn eth_syncing(&self) -> Result<JsonRpcResult<bool>>
pub async fn eth_coinbase(&self) -> Result<JsonRpcResult<String>>
pub async fn eth_mining(&self) -> Result<JsonRpcResult<bool>>
pub async fn eth_hashrate(&self) -> Result<JsonRpcResult<String>>
pub async fn eth_gas_price(&self) -> Result<JsonRpcResult<String>>
pub async fn eth_accounts(&self) -> Result<JsonRpcResult<Vec<String>>>
pub async fn eth_get_balance( &self, address: &str, tag: Option<Tag>, ) -> Result<JsonRpcResult<String>>
pub async fn eth_get_storage_at( &self, data: &str, quantity: &str, tag: Option<Tag>, ) -> Result<JsonRpcResult<String>>
pub async fn eth_get_transaction_count( &self, address: &str, tag: Option<Tag>, ) -> Result<JsonRpcResult<String>>
pub async fn eth_get_block_transaction_count_by_hash( &self, hash: &str, ) -> Result<JsonRpcResult<String>>
pub async fn eth_get_block_transaction_count_by_number( &self, number: &str, ) -> Result<JsonRpcResult<String>>
pub async fn eth_get_uncle_count_by_block_hash( &self, hash: &str, ) -> Result<JsonRpcResult<String>>
pub async fn eth_get_uncle_count_by_block_number( &self, number: &str, ) -> Result<JsonRpcResult<String>>
pub async fn eth_get_code( &self, address: &str, tag: Option<Tag>, ) -> Result<JsonRpcResult<String>>
pub async fn eth_sign( &self, address: &str, data: &str, ) -> Result<JsonRpcResult<String>>
pub async fn eth_send_transaction( &self, from: &str, to: &str, gas: &str, gas_price: &str, value: &str, data: &str, ) -> Result<JsonRpcResult<String>>
pub async fn eth_send_raw_transaction( &self, hash: &str, ) -> Result<JsonRpcResult<String>>
pub async fn eth_call(&self, data: Value) -> Result<JsonRpcResult<String>>
pub async fn eth_estimate_gas( &self, data: Value, ) -> Result<JsonRpcResult<String>>
pub async fn eth_get_block_by_hash( &self, hash: &str, obj: bool, ) -> Result<JsonRpcResult<Block>>
pub async fn eth_get_block_by_number( &self, number: &str, obj: bool, ) -> Result<JsonRpcResult<Block>>
pub async fn eth_get_transaction_by_hash( &self, hash: &str, ) -> Result<JsonRpcResult<Transaction>>
pub async fn eth_block_number(&self) -> Result<JsonRpcResult<String>>
pub async fn eth_get_transaction_receipt( &self, hash: &str, ) -> Result<JsonRpcResult<Receipt>>
pub async fn eth_get_transaction_by_block_hash_and_index( &self, hash: &str, index: &str, ) -> Result<JsonRpcResult<Transaction>>
pub async fn eth_get_transaction_by_block_number_and_index( &self, number: &str, index: &str, ) -> Result<JsonRpcResult<Transaction>>
pub async fn eth_get_uncle_by_block_hash_and_index( &self, hash: &str, index: &str, ) -> Result<JsonRpcResult<Block>>
pub async fn eth_get_uncle_by_block_number_and_index( &self, hash: &str, index: &str, ) -> Result<JsonRpcResult<Block>>
pub async fn eth_get_compilers(&self) -> Result<JsonRpcResult<Vec<String>>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Web3
impl !RefUnwindSafe for Web3
impl Send for Web3
impl Sync for Web3
impl Unpin for Web3
impl !UnwindSafe for Web3
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more